2021-02-19 23:33:19 +08:00
|
|
|
:root
|
2021-04-02 20:24:16 +08:00
|
|
|
--site-bg: $light-site-bg
|
|
|
|
--block: $light-block
|
|
|
|
--block-border: darken($light-block, 5)
|
|
|
|
--block-hover: darken($light-block, 2)
|
|
|
|
--text-p0: $light-title
|
|
|
|
--text-p1: $light-text
|
|
|
|
--text-p2: mix($light-text, $light-site-bg, 80)
|
|
|
|
--text-p3: mix($light-text, $light-site-bg, 60)
|
2021-06-23 13:41:05 +08:00
|
|
|
--text-p4: mix($light-text, $light-site-bg, 35)
|
2021-04-02 20:24:16 +08:00
|
|
|
--text-meta: mix($light-text, $light-site-bg, 20)
|
2021-06-23 13:41:05 +08:00
|
|
|
--text-code: $light-code
|
2021-04-02 20:24:16 +08:00
|
|
|
--card: $light-card
|
2021-02-19 23:33:19 +08:00
|
|
|
--theme-highlight: darken($color-theme, 5)
|
2021-04-02 20:24:16 +08:00
|
|
|
--theme-bg: mix($color-theme, $light-card, 10)
|
2021-02-19 23:33:19 +08:00
|
|
|
|
2021-04-02 20:24:16 +08:00
|
|
|
if hexo-config('style.darkmode') == 'auto'
|
|
|
|
// 系统的dark模式
|
|
|
|
@media (prefers-color-scheme: dark)
|
|
|
|
:root
|
|
|
|
--site-bg: $dark-site-bg
|
|
|
|
--block: $dark-block
|
|
|
|
--block-border: lighten($dark-block, 10)
|
|
|
|
--block-hover: darken($dark-block, 1)
|
|
|
|
--text-p0: $dark-title
|
|
|
|
--text-p1: $dark-text
|
|
|
|
--text-p2: mix($dark-text, $dark-site-bg, 70)
|
|
|
|
--text-p3: mix($dark-text, $dark-site-bg, 45)
|
2021-06-23 13:41:05 +08:00
|
|
|
--text-p4: mix($dark-text, $dark-site-bg, 35)
|
2021-04-02 20:24:16 +08:00
|
|
|
--text-meta: mix($dark-text, $dark-site-bg, 30)
|
2021-06-23 13:41:05 +08:00
|
|
|
--text-code: $dark-code
|
2021-04-02 20:24:16 +08:00
|
|
|
--card: $dark-card
|
|
|
|
--theme-highlight: $color-theme
|
|
|
|
--theme-bg: mix($color-theme, $dark-card, 10)
|
|
|
|
@media screen and (max-width: $device-tablet)
|
|
|
|
--site-bg: $dark-site-bg-mobile
|