mirror of
https://github.com/moku-project/Moku.git
synced 2026-06-13 01:09:56 -05:00
fix: Data-theme attribute on document body
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user