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

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