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:
@@ -39,6 +39,9 @@ function resolve(pref: ThemePreference): ResolvedTheme {
|
||||
|
||||
function applyTheme(resolved: ResolvedTheme): void {
|
||||
document.documentElement.dataset.theme = resolved;
|
||||
document
|
||||
.querySelector('meta[name="theme-color"]')
|
||||
?.setAttribute("content", resolved === "light" ? "#eeecea" : "#0e1a2e");
|
||||
}
|
||||
|
||||
function notifyAll(): void {
|
||||
|
||||
Reference in New Issue
Block a user