`prefers-color-scheme` is not being honored.
Tested with native dark mode and with [my add-on](https://addons.mozilla.org/firefox/addon/dark-mode-website-switcher/?src=external-github).
Firefox 68
Previous discussion: https://social.wiuwiu.de/@rugk/102135280755268256
I checked for mistakes and found out what was wrong pretty fast.
It's now fixed on the development server and will get into production with the next version.
Unfortunately it only works with native dark mode and not with you plugin.
window.matchMedia("(prefers-color-scheme:dark)").matches seems to ignore whether your plugin is enabled but I can't do anything about that.
That's either a bug in you plugin or in Firefox itself.
I checked for mistakes and found out what was wrong pretty fast.
It's now fixed on the development server and will get into production with the next version.
Unfortunately it only works with native dark mode and not with you plugin.
```window.matchMedia("(prefers-color-scheme:dark)").matches``` seems to ignore whether your plugin is enabled but I can't do anything about that.
That's either a bug in you plugin or in Firefox itself.
Actually my add-on does indeed fake window.matchMedia("(prefers-color-scheme:dark)").matches. However, I need to look into the details, when I have a running instance with that change.
Actually my add-on does indeed fake `window.matchMedia("(prefers-color-scheme:dark)").matches`. However, I need to look into the details, when I have a running instance with that change.
At least in my Firefox setup it does not fake window.matchMedia("(prefers-color-scheme:dark)").matches.
I typed exactly this command into the Javascript console and with native dark mode it worked well but it totally ignored your plugin.
At least in my Firefox setup it does not fake ```window.matchMedia("(prefers-color-scheme:dark)").matches```.
I typed exactly this command into the Javascript console and with native dark mode it worked well but it totally ignored your plugin.
Ah okay, found the issue. It required the space, i.e. try window.matchMedia("(prefers-color-scheme: dark)").matches.
Is the add-on really enabled?
I.e.:
![](https://hostux.pics/images/2019/05/25/image33631fb7de66ea13.png)
---
Ah okay, found the issue. It required the space, i.e. try `window.matchMedia("(prefers-color-scheme: dark)").matches`.
I can confirm that it works with the space and fixed it on the development server so that it will work with the next Halcyon version.
Anyway that is pretty weird behavior by your plugin as the native dark mode works quite well without the space.
Maybe you should fix that problem,too.
I can confirm that it works with the space and fixed it on the development server so that it will work with the next Halcyon version.
Anyway that is pretty weird behavior by your plugin as the native dark mode works quite well without the space.
Maybe you should fix that problem,too.
prefers-color-scheme
is not being honored.Tested with native dark mode and with my add-on.
Firefox 68
Previous discussion: https://social.wiuwiu.de/@rugk/102135280755268256
I checked for mistakes and found out what was wrong pretty fast. It's now fixed on the development server and will get into production with the next version. Unfortunately it only works with native dark mode and not with you plugin.
window.matchMedia("(prefers-color-scheme:dark)").matches
seems to ignore whether your plugin is enabled but I can't do anything about that. That's either a bug in you plugin or in Firefox itself.Actually my add-on does indeed fake
window.matchMedia("(prefers-color-scheme:dark)").matches
. However, I need to look into the details, when I have a running instance with that change.At least in my Firefox setup it does not fake
window.matchMedia("(prefers-color-scheme:dark)").matches
. I typed exactly this command into the Javascript console and with native dark mode it worked well but it totally ignored your plugin.Is the add-on really enabled? I.e.:
Ah okay, found the issue. It required the space, i.e. try
window.matchMedia("(prefers-color-scheme: dark)").matches
.I can confirm that it works with the space and fixed it on the development server so that it will work with the next Halcyon version. Anyway that is pretty weird behavior by your plugin as the native dark mode works quite well without the space. Maybe you should fix that problem,too.
Yep, tracked in https://github.com/rugk/website-dark-mode-switcher/issues/7.
So this here seems to be solved. :smile:
Okay, fixed in https://github.com/rugk/website-dark-mode-switcher/commit/0f1f16697e28356961eae7755bd4a7a963015426, BTW.