From 584b917f9875c22fc0eee48c996e17a76694ab17 Mon Sep 17 00:00:00 2001 From: Zerebos Date: Mon, 25 May 2026 20:59:24 -0400 Subject: [PATCH] fix: Data-theme attribute on document body --- src/lib/core/theme.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/core/theme.ts b/src/lib/core/theme.ts index 8478a42..ae4f3e4 100644 --- a/src/lib/core/theme.ts +++ b/src/lib/core/theme.ts @@ -17,7 +17,7 @@ export function applyTheme(themeId: string, customThemes: CustomTheme[] = []) { document.head.appendChild(themeStyleEl) } themeStyleEl.textContent = `:root {\n${vars}\n}` - document.documentElement.removeAttribute('data-theme') + document.body.removeAttribute('data-theme') return } @@ -25,7 +25,7 @@ export function applyTheme(themeId: string, customThemes: CustomTheme[] = []) { themeStyleEl.remove() themeStyleEl = null } - document.documentElement.setAttribute('data-theme', themeId) + document.body.setAttribute('data-theme', themeId) } export function mountSystemThemeSync(