BS-003 Apply approved palette and persistent accessible themes

This commit is contained in:
rob
2026-11-10 14:09:56 +00:00
parent ea28637259
commit 2a4ffe1b00
18 changed files with 243 additions and 143 deletions
+11
View File
@@ -0,0 +1,11 @@
// Runs synchronously in <head>, before React/styles paint. Dark is the default.
(function () {
var theme = 'dark';
try {
if (window.localStorage.getItem('bortstack-theme') === 'light') theme = 'light';
} catch { /* Storage is optional; rendering and the toggle remain available. */ }
document.documentElement.dataset.bsTheme = theme;
document.documentElement.style.colorScheme = theme;
var meta = document.querySelector('meta[name="theme-color"]');
if (meta) meta.content = theme === 'light' ? '#F5F7FA' : '#0E1117';
}());