fix: Data-theme attribute on document body

This commit is contained in:
Zerebos
2026-05-25 20:59:24 -04:00
parent e9929747d2
commit 584b917f98
+2 -2
View File
@@ -17,7 +17,7 @@ export function applyTheme(themeId: string, customThemes: CustomTheme[] = []) {
document.head.appendChild(themeStyleEl) document.head.appendChild(themeStyleEl)
} }
themeStyleEl.textContent = `:root {\n${vars}\n}` themeStyleEl.textContent = `:root {\n${vars}\n}`
document.documentElement.removeAttribute('data-theme') document.body.removeAttribute('data-theme')
return return
} }
@@ -25,7 +25,7 @@ export function applyTheme(themeId: string, customThemes: CustomTheme[] = []) {
themeStyleEl.remove() themeStyleEl.remove()
themeStyleEl = null themeStyleEl = null
} }
document.documentElement.setAttribute('data-theme', themeId) document.body.setAttribute('data-theme', themeId)
} }
export function mountSystemThemeSync( export function mountSystemThemeSync(