mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-06-29 23:05:59 -04:00
restore live theme switching when system setting changes
TODO: removing the event listener is infuriatingly not cooperating
This commit is contained in:
@@ -14,8 +14,4 @@ try {
|
||||
cl.remove("light");
|
||||
cl.add("dark");
|
||||
}
|
||||
|
||||
// TODO: fix real-time switching (works but bulb icon isn't updated)
|
||||
// window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", (e) => e.matches && setDark(true));
|
||||
// window.matchMedia("(prefers-color-scheme: light)").addEventListener("change", (e) => e.matches && setDark(false));
|
||||
} catch (error) {}
|
||||
|
||||
Reference in New Issue
Block a user