BS-003 Apply approved palette and persistent accessible themes
This commit is contained in:
@@ -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';
|
||||
}());
|
||||
Reference in New Issue
Block a user