From 936bad455f4227ac4f865bf87c8c33856d22f059 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 1 Jan 2024 19:59:50 -0800 Subject: [PATCH] fix: default theme should be dark --- src/app.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app.html b/src/app.html index 642a570e2..9b1099b0b 100644 --- a/src/app.html +++ b/src/app.html @@ -12,12 +12,12 @@ (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: light)').matches) ) { document.documentElement.classList.add('light'); - } else if (localStorage.theme === 'dark') { - document.documentElement.classList.add('dark'); - } else { + } else if (localStorage.theme) { localStorage.theme.split(' ').forEach((e) => { document.documentElement.classList.add(e); }); + } else { + document.documentElement.classList.add('dark'); }