Optimized the dark-mode toggle
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
@mixin dark-sheme {
|
||||
@mixin dark-scheme {
|
||||
/* syntax highlight colors from https://raw.githubusercontent.com/jwarby/pygments-css/master/monokai.css */
|
||||
--highlight-pre-bg: #272822;
|
||||
--highlight-hll-bg: #272822;
|
||||
@@ -86,13 +86,13 @@
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html:not(.light-mode) { /* could be html.dark-mode */
|
||||
@include dark-sheme;
|
||||
html:not([mode]), html[mode=dark] {
|
||||
@include dark-scheme;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
html.dark-mode {
|
||||
@include dark-sheme;
|
||||
html[mode=dark] {
|
||||
@include dark-scheme;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user