mirror of
https://github.com/discourse/discourse.git
synced 2025-03-04 18:29:20 +00:00
FIX: darkMode availiability detection was broken (#17207)
This regressed on 2f66eb5 where CSS was moved from the HTML document head to the body. Bug report at https://meta.discourse.org/t/-/230656?u=falco
This commit is contained in:
parent
684bc821be
commit
a0f3ec7b13
@ -70,9 +70,8 @@ export default {
|
||||
}
|
||||
|
||||
session.darkModeAvailable =
|
||||
document.head.querySelectorAll(
|
||||
'link[media="(prefers-color-scheme: dark)"]'
|
||||
).length > 0;
|
||||
document.querySelectorAll('link[media="(prefers-color-scheme: dark)"]')
|
||||
.length > 0;
|
||||
|
||||
session.defaultColorSchemeIsDark = setupData.colorSchemeIsDark === "true";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user