Theming: include the current theme ID as an attribute for the body element (#8842)

This commit is contained in:
Adorian Doran 2026-02-26 19:14:37 +02:00 committed by GitHub
commit aa247ef06c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,8 +73,9 @@ export default class RootContainer extends FlexContainer<BasicWidget> {
#initTheme() {
const colorSchemeChangeObserver = matchMedia("(prefers-color-scheme: dark)")
colorSchemeChangeObserver.addEventListener("change", () => this.#updateColorScheme());
this.#updateColorScheme();
document.body.setAttribute("data-theme-id", options.get("theme"));
}
#updateColorScheme() {