Sync theme-color meta tag with active light/dark theme

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lukas
2026-03-24 17:59:13 +01:00
parent 4d0ec0c7b2
commit 9e09c8ae2a

View File

@@ -39,6 +39,9 @@ function resolve(pref: ThemePreference): ResolvedTheme {
function applyTheme(resolved: ResolvedTheme): void { function applyTheme(resolved: ResolvedTheme): void {
document.documentElement.dataset.theme = resolved; document.documentElement.dataset.theme = resolved;
document
.querySelector('meta[name="theme-color"]')
?.setAttribute("content", resolved === "light" ? "#eeecea" : "#0e1a2e");
} }
function notifyAll(): void { function notifyAll(): void {