Skip to content

Commit

Permalink
add dark mode theme
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceninja committed Aug 11, 2023
1 parent aa7df89 commit 07141ae
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/_scss/theme.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
:root {
--color-bg: #fff;
--color-fg: #333;
--color-link: #34d;
}

@media (prefers-color-scheme: dark) {
:root {
--color-bg: #121212;
--color-fg: #e3e3e3;
--color-link: #bb86fc;
}
}

html {
box-sizing: border-box;
color-scheme: light dark;
Expand All @@ -10,12 +24,18 @@ html {
}

body {
background: var(--color-bg);
color: var(--color-fg);
font-family: Merriweather, serif;
font-size: 18px;
line-height: 1.75;
margin: 1em;
}

a {
color: var(--color-link);
}

main {
margin-bottom: 2em;
margin-inline: auto;
Expand Down

0 comments on commit 07141ae

Please sign in to comment.