Skip to content

Commit

Permalink
feat: implement default color mode configuration
Browse files Browse the repository at this point in the history
- Add configuration option for default color mode
- Set root color based on user-defined default mode
- Fallback to light mode if configuration is not set to dark
  • Loading branch information
EvanNotFound committed Nov 17, 2024
1 parent 4df8a07 commit 5455c10
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/css/common/theme.styl
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ root-color(mode) {
}


$temp-mode = hexo-config('colors.default_mode')
$default-mode = $temp-mode == 'dark' ? 'dark' : 'light'

:root {
root-color('light')
root-color($default-mode)
}

.light-mode {
Expand Down

0 comments on commit 5455c10

Please sign in to comment.