Skip to content

Commit 9eefc8f

Browse files
committed
🐛 修复暗色模式自动判断 #967
1 parent 4d04bb6 commit 9eefc8f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

source/css/_pages/_base/color-schema.styl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ dark-colors()
5959
transition background-color .2s ease-in-out
6060

6161
if (hexo-config("dark_mode.enable"))
62-
@media not print and (prefers-color-scheme: dark)
62+
@media (prefers-color-scheme: dark)
6363
:root
6464
--color-mode "dark"
6565

@@ -69,3 +69,7 @@ if (hexo-config("dark_mode.enable"))
6969
@media not print
7070
[data-user-color-scheme="dark"]
7171
dark-colors()
72+
73+
@media print
74+
:root
75+
--color-mode "light"

0 commit comments

Comments
 (0)