client/theming: include the current theme ID as an attribute on the body element

This commit is contained in:
Adorian Doran 2026-02-26 17:50:23 +02:00
parent f0e8c0f79d
commit dfb44def2b

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() {