feat: update darkmode support

This commit is contained in:
Sivan 2020-05-18 00:49:59 +08:00
parent 150d657a8e
commit a0367d5a66
14 changed files with 1456 additions and 504 deletions

View file

@ -127,7 +127,7 @@ a {
}
}
@media (prefers-color-scheme: dark) {
@mixin darkmode() {
body {
background-color: hsl(0, 0%, 24%);
}
@ -151,3 +151,14 @@ a {
}
}
}
// Force dark mode
[data-darkmode="dark"] {
@include darkmode();
}
@media (prefers-color-scheme: dark) {
[data-darkmode="auto"] {
@include darkmode();
}
}