aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-11 10:47:23 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-11 10:47:23 +0800
commit80d6cae3e868172b2e4a809305f8b51675d68199 (patch)
treef6996b95c35e26849d77c816bf5cdfb6447af2cd /static
parentstyle.css: Padding in px, not rem (diff)
downloadforge-80d6cae3e868172b2e4a809305f8b51675d68199.tar.gz
forge-80d6cae3e868172b2e4a809305f8b51675d68199.tar.zst
forge-80d6cae3e868172b2e4a809305f8b51675d68199.zip
style.css: Add dark theme
Diffstat (limited to 'static')
-rw-r--r--static/style.css17
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 */
}