theme toggle with dark map style and mapterhorn terrain

This commit is contained in:
Vincent van der Wal
2026-07-22 11:26:26 +02:00
parent addef8b78e
commit bca5154459
5 changed files with 199 additions and 42 deletions
+21 -1
View File
@@ -18,8 +18,10 @@
--critical: #d03b3b;
}
/* dark tokens apply when the OS prefers dark (unless the user forced light),
or when the user forced dark via the theme toggle */
@media (prefers-color-scheme: dark) {
:root {
:root:where(:not([data-theme='light'])) {
color-scheme: dark;
--page: #0d0d0d;
--surface-1: #1a1a19;
@@ -38,6 +40,24 @@
--good-text: #0ca30c;
}
}
:root[data-theme='dark'] {
color-scheme: dark;
--page: #0d0d0d;
--surface-1: #1a1a19;
--text-primary: #ffffff;
--text-secondary: #c3c2b7;
--text-muted: #898781;
--grid: #2c2c2a;
--baseline: #383835;
--border: rgba(255, 255, 255, 0.1);
--wash: rgba(255, 255, 255, 0.06);
--accent: #3987e5;
--accent-strong: #6da7ec;
--accent-wash: rgba(57, 135, 229, 0.16);
--accent-track: #184f95;
--good: #0ca30c;
--good-text: #0ca30c;
}
* {
box-sizing: border-box;