feat(decnet_web/theme-lab): light theme tokens + dev toggle

Adds html[data-theme="light"] block to index.css overriding the
core six tokens (bg, matrix, violet, panel, border, alert), the
matrix/violet/alert tints, and the foreground opacity ramp to a
cream-on-ink palette anchored on #dbdad6. Glows are no-op'd —
light mode trades neon haloes for hard 1px borders.

Lab page gets a Dark/Light toggle that flips
html.dataset.theme and persists to sessionStorage
(decnet_theme_lab) — intentionally tab-scoped, not user-facing.
App.tsx hydrates the same key on boot so a tab reload keeps the
dev's chosen theme. The user-facing localStorage toggle ships
later via Config.
This commit is contained in:
2026-05-09 03:23:50 -04:00
parent f3f7bff717
commit 47c57271e7
6 changed files with 191 additions and 1 deletions

View File

@@ -182,6 +182,17 @@ function App() {
}
} catch { /* fall through to default */ }
document.documentElement.setAttribute('data-accent', accent);
/* Lab theme persists in sessionStorage so a tab reload keeps the
* dev's chosen theme without leaking to other tabs or users. The
* production user-facing toggle (localStorage `decnet_theme`)
* arrives with the Config-page setting in a later task. */
try {
const labTheme = sessionStorage.getItem('decnet_theme_lab');
if (labTheme === 'light' || labTheme === 'dark') {
document.documentElement.setAttribute('data-theme', labTheme);
}
} catch { /* ignore */ }
}, []);
const handleLogin = (newToken: string) => setToken(newToken);