fix: color flicker, close #183

This commit is contained in:
Anthony Fu 2021-09-06 14:48:07 +08:00
parent a650f660e7
commit 0bd6a8b185

View File

@ -14,7 +14,7 @@
<script>
(function() {
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
const setting = localStorage.getItem('color-schema') || 'auto'
const setting = localStorage.getItem('vueuse-color-scheme') || 'auto'
if (setting === 'dark' || (prefersDark && setting !== 'light'))
document.documentElement.classList.toggle('dark', true)
})()