Workaround for dark mode

This commit is contained in:
Lea Verou
2025-03-26 17:11:28 -04:00
parent d451ba98e5
commit 09f668fc99
3 changed files with 15 additions and 1 deletions

View File

@@ -118,6 +118,7 @@ const colorScheme = new ThemeAspect({
domChange(() => {
let dark = this.computedValue === 'dark';
document.documentElement.classList.toggle(`wa-dark`, dark);
document.documentElement.dispatchEvent(new CustomEvent('wa-color-scheme-change', { detail: { dark } }));
});
},
});