From 18e774629a281a226507110d74862164a1f3224a Mon Sep 17 00:00:00 2001 From: Evan Luo Date: Wed, 4 Sep 2024 08:37:45 -0400 Subject: [PATCH 1/2] style: improve inline code styling and color variables #428 #429 - Separate inline code color variables from block code variables - Update inline code styling to use new color variables - Adjust color values for better contrast in light and dark modes --- source/css/common/codeblock/code-theme.styl | 9 +++++++-- source/css/common/codeblock/highlight.styl | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/source/css/common/codeblock/code-theme.styl b/source/css/common/codeblock/code-theme.styl index 22b06461..8fb945e3 100755 --- a/source/css/common/codeblock/code-theme.styl +++ b/source/css/common/codeblock/code-theme.styl @@ -37,9 +37,14 @@ $highlight-gutter-bg-color = #f6f8fa $dark-highlight-gutter-color = #8b949e $dark-highlight-gutter-bg-color = #161b22 +$inline-code-foreground = #24292e +$inline-code-background = #f1f1f1 +$dark-inline-code-foreground = #c9d1d9 +$dark-inline-code-background = #313131 + code-theme(mode) - --code-foreground: mode == 'light' ? $highlight-foreground : $dark-code-foreground - --code-background: mode == 'light' ? $highlight-background : $dark-code-background + --inline-code-foreground: mode == 'light' ? $inline-code-foreground : $dark-inline-code-foreground + --inline-code-background: mode == 'light' ? $inline-code-background : $dark-inline-code-background --highlight-background: mode == 'light' ? $highlight-background : $dark-highlight-background --highlight-foreground: mode == 'light' ? $highlight-foreground : $dark-highlight-foreground --highlight-keyword: mode == 'light' ? $highlight-keyword : $dark-highlight-keyword diff --git a/source/css/common/codeblock/highlight.styl b/source/css/common/codeblock/highlight.styl index 98b612b6..f609222a 100755 --- a/source/css/common/codeblock/highlight.styl +++ b/source/css/common/codeblock/highlight.styl @@ -28,8 +28,8 @@ code padding 3px 4px word-wrap break-word border-radius $redefine-border-radius-xsmall - color var(--code-foreground) - background var(--code-background) + color var(--inline-code-foreground) + background var(--inline-code-background) .main-content code font-size: 0.9em From 1a22cc9e502bbe0f4e430213a7c62d12113b8c70 Mon Sep 17 00:00:00 2001 From: Evan Luo Date: Wed, 4 Sep 2024 08:40:40 -0400 Subject: [PATCH 2/2] chore: bump version to 2.7.1 - Update version number in package.json and package-lock.json - Prepare for new release with minor version increment --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0211e462..8d888419 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hexo-theme-redefine", - "version": "2.7.0", + "version": "2.7.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "hexo-theme-redefine", - "version": "2.7.0", + "version": "2.7.1", "license": "AGPL-3.0", "dependencies": { "postcss": "^8.4.28" diff --git a/package.json b/package.json index 6f65aa9b..8cbd587f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-redefine", - "version": "2.7.0", + "version": "2.7.1", "private": false, "description": "Redefine your writing with Hexo Theme Redefine.", "scripts": {