Add automatic dark/light theme switching based on os

This commit is contained in:
Djordje Atlialp 2021-01-14 10:55:00 +01:00
parent 8035db5c05
commit 79d0488087
16 changed files with 28 additions and 72 deletions

View file

@ -35,7 +35,7 @@ body {
font-size: 1rem;
}
&.dark-theme {
@media (prefers-color-scheme: dark) {
background-color: $dark-background;
color: $dark-color;
}
@ -175,7 +175,7 @@ figure {
em, i, strong {
color: black;
.dark-theme & {
@media (prefers-color-scheme: dark) {
color: white;
}
}
@ -190,7 +190,7 @@ code {
border-radius: 5px;
font-size: 0.95rem;
.dark-theme & {
@media (prefers-color-scheme: dark) {
background: $dark-background-secondary;
}
}
@ -214,7 +214,7 @@ pre {
padding: 0;
font-size: inherit;
.dark-theme & {
@media (prefers-color-scheme: dark) {
color: inherit;
}
}
@ -290,7 +290,7 @@ hr {
background: $light-border-color;
height: 1px;
.dark-theme & {
@media (prefers-color-scheme: dark) {
background: $dark-border-color;
}
}