From 7ae0dabaa80834d17aa516cf0b42f85166ef9dd8 Mon Sep 17 00:00:00 2001 From: XPoet Date: Tue, 1 Nov 2022 22:51:23 +0800 Subject: [PATCH] style: optimized code block font color setting --- source/css/common/code-block/code-block.styl | 6 ++++++ source/css/common/code-block/highlight.styl | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/source/css/common/code-block/code-block.styl b/source/css/common/code-block/code-block.styl index 00fea68..4323f74 100644 --- a/source/css/common/code-block/code-block.styl +++ b/source/css/common/code-block/code-block.styl @@ -98,6 +98,9 @@ font-weight 600 font-size 0.9rem font-family "Source Code Pro", consolas, Menlo + if (hexo-config('code_block.highlight_theme') == 'default') { + color var(--text-color-3) + } } @@ -107,6 +110,9 @@ i { font-size 0.8rem + if (hexo-config('code_block.highlight_theme') == 'default') { + color var(--text-color-3) + } } } diff --git a/source/css/common/code-block/highlight.styl b/source/css/common/code-block/highlight.styl index d1b8ba3..5ade7d0 100644 --- a/source/css/common/code-block/highlight.styl +++ b/source/css/common/code-block/highlight.styl @@ -98,6 +98,10 @@ pre { height 1.5rem color var(--highlight-foreground) + .language-javascript { + color var(--highlight-foreground) + } + .attr { color var(--highlight-foreground) }