fix(auth): simplify dark mode condition to only check explicit setting
Remove reliance on prefers-color-scheme when dark mode preference is explicitly stored, preventing unintended dark mode activation.
This commit is contained in:
1 file changed
+1
-1
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<script>
|
||||
(function() {
|
||||
if (localStorage.getItem('darkMode') === 'true' || (!localStorage.getItem('darkMode') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
||||
if (localStorage.getItem('darkMode') === 'true') {
|
||||
document.documentElement.classList.add('dark');
|
||||
}
|
||||
})();
|
||||
|
||||
Reference in new issue
Block a user