Skip to content

Commit 51a155e

Browse files
author
zsw
committed
feat: add the --bgm-bg-color to adapt to dark mode
1 parent 9493f07 commit 51a155e

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

components/Mode/modeOptions.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ const modeOptions = {
44
'--box-shadow': '0 1px 6px 0 rgba(0, 0, 0, 0.2)',
55
'--box-shadow-hover': '0 2px 16px 0 rgba(0, 0, 0, 0.2)',
66
'--text-color': '#2c3e50',
7-
'--border-color': '#eaecef'
7+
'--border-color': '#eaecef',
8+
'--bgm-bg-color': 'rgba(255, 255, 255, .7)'
89
},
910
dark: {
1011
'--background-color': '#25272a',
1112
'--box-shadow': '0 1px 6px 0 rgba(0, 0, 0, .9)',
1213
'--box-shadow-hover': '0 2px 26px 0 rgba(0, 0, 0, .9)',
1314
'--text-color': '#aaa',
14-
'--border-color': 'rgba(0, 0, 0, .9)'
15+
'--border-color': 'rgba(0, 0, 0, .9)',
16+
'--bgm-bg-color': 'rgba(0, 0, 0, .7)'
1517
}
1618
}
1719

styles/mode.styl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
--box-shadow-hover $boxShadowHover
55
--text-color $textColor
66
--border-color $borderColor
7+
--bgm-bg-color $bgmBgColor
78
@media (prefers-color-scheme: dark)
89
--background-color $backgroundColorDark
910
--box-shadow $boxShadowDark
1011
--box-shadow-hover $boxShadowHoverDark
1112
--text-color $textColorDark
1213
--border-color $borderColorDark
14+
--bgm-bg-color $bgmBgColorDark

styles/palette.styl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ $textColorDark ?= #aaa
1515

1616
$borderColor ?= #eaecef
1717
$borderColorDark ?= rgba(0, 0, 0, .9)
18+
19+
$bgmBgColor ?= rgba(255, 255, 255, .7)
20+
$bgmBgColorDark ?= rgba(0, 0, 0, .7)

0 commit comments

Comments
 (0)