Skip to content

Commit 4a0274d

Browse files
committed
Favour dark mode if possible
1 parent 7910ace commit 4a0274d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

www/routes/_app.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ export default define.page(function App({ Component, state, url }) {
4747
// deno-lint-ignore react-no-danger
4848
dangerouslySetInnerHTML={{
4949
__html: `
50-
const isDarkMode = localStorage.theme === "dark"
51-
|| (!("theme" in localStorage)
52-
&& window.matchMedia("(prefers-color-scheme: dark)").matches);
50+
const isDarkMode = localStorage.theme === "dark";
5351
document.documentElement.dataset.theme = isDarkMode ? "dark" : "light";`,
5452
}}
5553
>

0 commit comments

Comments
 (0)