Skip to content

Commit

Permalink
fix: inline code background color under dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ParaN3xus authored and Cerallin committed Aug 24, 2024
1 parent f6f551b commit 0459b30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/css/_partial/article.styl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

code
text-color(primary-color, primary-color-light, primary-color-dark)
background-color(#ceceff, #ceceff, #33333e)
background-color(code-background-color, code-background-color-light, code-background-color-dark)
vertical-align: middle
padding: 3px 0.4em
border-radius: 3px
Expand Down
4 changes: 4 additions & 0 deletions source/css/_variables.styl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ info-font-size = 14px
// Colors for light mode
background-color-light = #ffffff
primary-color-light = #333333
code-background-color-light = #CECEFF
primary-gray-light = #AAAAAA
secondary-color-light = #838383
secondary-gray-light = #666666
Expand All @@ -22,6 +23,7 @@ border-table-light = #000000
// Colors for dark mode
background-color-dark = #101010
primary-color-dark = #CDCDCD
code-background-color-dark = #33333E
primary-gray-dark = #565656
secondary-color-dark = #7D7D7D
secondary-gray-dark = #9A9A9A
Expand All @@ -32,6 +34,7 @@ border-table-dark = #ffffff
if (!hexo-config('dark_mode'))
$background-color = background-color-light
primary-color = primary-color-light
code-background-color = code-background-color-light
primary-gray = primary-gray-light
secondary-color = secondary-color-light
secondary-gray = secondary-gray-light
Expand All @@ -41,6 +44,7 @@ if (!hexo-config('dark_mode'))
else
$background-color = background-color-dark
primary-color = primary-color-dark
code-background-color = code-background-color-dark
primary-gray = primary-gray-dark
secondary-color = secondary-color-dark
secondary-gray = secondary-gray-dark
Expand Down

0 comments on commit 0459b30

Please sign in to comment.