Add color-scheme CSS property (#388)

This commit is contained in:
Ren Baoshuo 2021-11-02 18:36:21 +08:00 committed by GitHub
parent f8c0f46bd4
commit 0fc5f849b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,8 @@
--highlight-foreground: $highlight-foreground;
--highlight-gutter-background: $highlight-gutter-background;
--highlight-gutter-foreground: $highlight-gutter-foreground;
color-scheme: light;
}
if (hexo-config('darkmode')) {
@ -54,6 +56,8 @@ if (hexo-config('darkmode')) {
--highlight-foreground: $highlight-foreground-dark;
--highlight-gutter-background: $highlight-gutter-background-dark;
--highlight-gutter-foreground: $highlight-gutter-foreground-dark;
color-scheme: dark;
}
img {
@ -63,5 +67,9 @@ if (hexo-config('darkmode')) {
opacity: .9;
}
}
iframe {
color-scheme: light;
}
}
}