Skip to content

Commit

Permalink
Add color-scheme CSS property (next-theme#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
renbaoshuo committed Nov 2, 2021
1 parent f8c0f46 commit 0fc5f84
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions source/css/_colors.styl
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down Expand Up @@ -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 {
Expand All @@ -63,5 +67,9 @@ if (hexo-config('darkmode')) {
opacity: .9;
}
}

iframe {
color-scheme: light;
}
}
}

0 comments on commit 0fc5f84

Please sign in to comment.