Merge pull request #63 from jtagcat/ui.systemUsesDarkTheme
Add support for prefers-color-scheme: dark.
This commit is contained in:
commit
7545a57c52
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@
|
|||
let sunset;
|
||||
|
||||
function setBodyClass() {
|
||||
if (now > sunrise && now < sunset) return;
|
||||
if (window.matchMedia("(prefers-color-scheme: dark)").matches || now > sunrise && now < sunset) return;
|
||||
document.body.classList.add('dark');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue