fix: themes wouldnt apply
This commit is contained in:
2 files changed
+4
-8
No files matched your search
@@ -43,11 +43,7 @@
|
|||||||
|
|
||||||
<svelte:window {onscroll} />
|
<svelte:window {onscroll} />
|
||||||
|
|
||||||
<div
|
<div {...rest} class="shell bg-slate-50 dark:bg-zinc-950 {clazz}">
|
||||||
{...rest}
|
|
||||||
class="shell bg-slate-50 dark:bg-zinc-950 {clazz}"
|
|
||||||
style={theme.vars}
|
|
||||||
>
|
|
||||||
{@render children?.()}
|
{@render children?.()}
|
||||||
<div
|
<div
|
||||||
class="fixed bottom-0 {dockVisible ? '' : 'max-lg:-bottom-24'} lg:top-0
|
class="fixed bottom-0 {dockVisible ? '' : 'max-lg:-bottom-24'} lg:top-0
|
||||||
|
|||||||
@@ -55,14 +55,14 @@
|
|||||||
if (browser) {
|
if (browser) {
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (settings) {
|
if (settings) {
|
||||||
document.body.classList.remove(
|
document.documentElement.classList.remove(
|
||||||
'font-display',
|
'font-display',
|
||||||
'font-inter',
|
'font-inter',
|
||||||
'font-sans',
|
'font-sans',
|
||||||
'font-system',
|
'font-system',
|
||||||
'font-nunito',
|
'font-nunito',
|
||||||
)
|
)
|
||||||
document.body.classList.add(
|
document.documentElement.classList.add(
|
||||||
settings.font == 'inter'
|
settings.font == 'inter'
|
||||||
? 'font-inter'
|
? 'font-inter'
|
||||||
: settings.font == 'system'
|
: settings.font == 'system'
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
document.body.setAttribute('style', theme.vars)
|
document.documentElement.setAttribute('style', theme.vars)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user