搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Auto Dark Mode feature on websites does not work

more options

Somehow, the prefers-color-scheme: dark media query does not seem to behave correctly in my browser. I am using Firefox 89.0.2 on Windows 10 21H1 and even though I have set the system theme to dark (which Firefox's System Theme adapts to, the browser UI is dark), websites which usually adapt to it (like YouTube when set to follow the device theme) do not do so and are using the light theme regardless. This issue persists even in troubleshooting mode, so it does not seem to be related to any add-on I have installed.

Testing the same websites on Firefox Nightly (91.0a1) and Developer Edition (90.0b12), they behave as expected, adapting to my system's dark theme. The same had been the case when I had been using Firefox 88 (where it did not work as expected), while websites on Nightly and Developer Edition (versions 90 and 89, respectively) did behave as expected.

Is there some fix for this issue, some setting that is supposed to be tweaked, or can a fix be expected in an upcoming release?

Somehow, the prefers-color-scheme: dark media query does not seem to behave correctly in my browser. I am using Firefox 89.0.2 on Windows 10 21H1 and even though I have set the system theme to dark (which Firefox's System Theme adapts to, the browser UI is dark), websites which usually adapt to it (like YouTube when set to follow the device theme) do not do so and are using the light theme regardless. This issue persists even in troubleshooting mode, so it does not seem to be related to any add-on I have installed. Testing the same websites on Firefox Nightly (91.0a1) and Developer Edition (90.0b12), they behave as expected, adapting to my system's dark theme. The same had been the case when I had been using Firefox 88 (where it did not work as expected), while websites on Nightly and Developer Edition (versions 90 and 89, respectively) did behave as expected. Is there some fix for this issue, some setting that is supposed to be tweaked, or can a fix be expected in an upcoming release?

被采纳的解决方案

Hmm, your Firefox user agent string indicates that you're running version 78.0, which can indicate that you turned on privacy.resistFingerprinting. Does that sound familiar?

I think it's one of the many (not so well documented) behaviors of this feature to block the media query related to your theme preference. In an old Reddit thread, an add-on was suggested as a workaround, but I lazily just looked at a couple threads and don't know whether that is a good solution: https://www.reddit.com/r/firefox/comments/dmhq4e/privacyresistfingerprinting_prefercolorscheme/

定位到答案原位置 👍 1

所有回复 (1)

more options

选择的解决方案

Hmm, your Firefox user agent string indicates that you're running version 78.0, which can indicate that you turned on privacy.resistFingerprinting. Does that sound familiar?

I think it's one of the many (not so well documented) behaviors of this feature to block the media query related to your theme preference. In an old Reddit thread, an add-on was suggested as a workaround, but I lazily just looked at a couple threads and don't know whether that is a good solution: https://www.reddit.com/r/firefox/comments/dmhq4e/privacyresistfingerprinting_prefercolorscheme/