Skip to content

Commit b7dae15

Browse files
committed
fix dark mode
1 parent 657fd84 commit b7dae15

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/DarkModeToggle.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ function toggleDark() {
2525
html?.classList.add('dark')
2626
}
2727
isDark.value = hasDarkClass()
28+
html?.style.setProperty('color-scheme', isDark.value ? 'dark' : null)
2829
localStorage.setItem('color-scheme', isDark.value ? 'dark' : 'light')
2930
}
3031
</script>

0 commit comments

Comments
 (0)