Skip to content

Commit 7094689

Browse files
committed
Add dark mode via prefers-color-scheme
Flip the CSS-variable token ramp to the brand's dark palette (executor/design.md) under prefers-color-scheme: dark, plus color-scheme: light dark for native controls. No toggle — follows the OS. Contrast verified (body 16.9:1, muted 7.0:1, meta 4.6:1).
1 parent 8a74260 commit 7094689

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

.claude/launch.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"version": "0.0.1",
3+
"configurations": [
4+
{ "name": "dev", "runtimeExecutable": "bun", "runtimeArgs": ["run", "dev"], "port": 4321 }
5+
]
6+
}

src/layouts/Base.astro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,27 @@ const canonical = path ? new URL(path, Astro.site).href : undefined;
5151
--font-sans: "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
5252
--font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
5353
--container: 1100px;
54+
color-scheme: light dark;
55+
}
56+
57+
/* Dark mode: brand dark tokens (executor/design.md). Roles flip — high
58+
token numbers become lighter text, low numbers become darker surfaces —
59+
so the whole token-driven UI follows without per-component changes. */
60+
@media (prefers-color-scheme: dark) {
61+
:root {
62+
--gray-1000: #ededed;
63+
--gray-900: #ededed;
64+
--gray-700: #c4c4c4;
65+
--gray-500: #9a9a9a;
66+
--gray-400: #7a7a7a;
67+
--gray-300: #5c5c5c;
68+
--gray-200: #333333;
69+
--gray-100: #1f1f1f;
70+
--gray-50: #1a1a1a;
71+
--gray-25: #141414;
72+
--white: #0a0a0a;
73+
}
74+
::selection { background: #28344a; }
5475
}
5576
*, *::before, *::after { box-sizing: border-box; }
5677
html { scrollbar-gutter: stable; }

0 commit comments

Comments
 (0)