diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-11 10:47:23 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-11 10:47:23 +0800 |
commit | 80d6cae3e868172b2e4a809305f8b51675d68199 (patch) | |
tree | f6996b95c35e26849d77c816bf5cdfb6447af2cd /static/style.css | |
parent | style.css: Padding in px, not rem (diff) | |
download | forge-80d6cae3e868172b2e4a809305f8b51675d68199.tar.gz forge-80d6cae3e868172b2e4a809305f8b51675d68199.tar.zst forge-80d6cae3e868172b2e4a809305f8b51675d68199.zip |
style.css: Add dark theme
Diffstat (limited to 'static/style.css')
-rw-r--r-- | static/style.css | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/static/style.css b/static/style.css index 46558f6..04b2612 100644 --- a/static/style.css +++ b/static/style.css @@ -1,5 +1,9 @@ html { font-family: sans-serif; + background-color: var(--background-color); + color: var(--text-color); + --background-color: hsl(0, 0%, 100%); + --text-color: hsl(0, 0%, 0%); --link-color: hsl(320, 50%, 36%); --light-text-color: hsl(0, 0%, 45%); --darker-border-color: hsl(0, 0%, 72%); @@ -8,6 +12,19 @@ html { --darker-box-background-color: hsl(0, 0%, 92%); --lighter-box-background-color: hsl(0, 0%, 95%); } +@media (prefers-color-scheme: dark) { + html { + --background-color: hsl(0, 0%, 0%); + --text-color: hsl(0, 0%, 100%); + --link-color: hsl(320, 50%, 64%); + --light-text-color: hsl(0, 0%, 78%); + --darker-border-color: hsl(0, 0%, 35%); + --lighter-border-color: hsl(0, 0%, 25%); + --text-decoration-color: hsl(0, 0%, 30%); + --darker-box-background-color: hsl(0, 0%, 20%); + --lighter-box-background-color: hsl(0, 0%, 15%); + } +} html, code, pre { font-size: 1rem; /* TODO: Not always correct */ } |