From 17b57da31a87f9c47db2f44b77365fc077bc13d9 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Tue, 19 Nov 2024 15:22:51 +0800 Subject: [PATCH] Fix figcaption style --- source/css/_common/components/post/post-body.styl | 3 ++- source/css/_common/outline/mobile.styl | 2 +- source/css/_common/scaffolding/highlight/index.styl | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/css/_common/components/post/post-body.styl b/source/css/_common/components/post/post-body.styl index d8462295b..ebc06af03 100644 --- a/source/css/_common/components/post/post-body.styl +++ b/source/css/_common/components/post/post-body.styl @@ -46,7 +46,8 @@ } // https://github.com/hexojs/hexo-renderer-marked/pull/264 - img + figcaption, .fancybox + figcaption { + // https://github.com/next-theme/hexo-next-exif + figure:not(.highlight) figcaption { color: $grey-dark; font-size: $font-size-small; font-weight: bold; diff --git a/source/css/_common/outline/mobile.styl b/source/css/_common/outline/mobile.styl index 264305417..47d2beff4 100644 --- a/source/css/_common/outline/mobile.styl +++ b/source/css/_common/outline/mobile.styl @@ -53,7 +53,7 @@ if (hexo-config('mobile_layout_economy')) { } // Fix issue #641 - img + figcaption, .fancybox + figcaption { + figure:not(.highlight) figcaption { margin: -5px auto 15px !important; } diff --git a/source/css/_common/scaffolding/highlight/index.styl b/source/css/_common/scaffolding/highlight/index.styl index 3115966b8..284456b9c 100644 --- a/source/css/_common/scaffolding/highlight/index.styl +++ b/source/css/_common/scaffolding/highlight/index.styl @@ -120,7 +120,7 @@ figure.highlight { } // See https://github.com/hexojs/hexo-util/pull/229 -pre .caption, pre figcaption { +pre .caption { @extend $figcaption; margin-bottom: 10px; }