[Bug] Custom browser theme breaks listening to system color scheme (Firefox, Linux)
See original GitHub issueBug Report
Bug Description
When Change the browser theme
(More
tab) is set to Custom
and automation is set to Use system color scheme
, the extension switches on but not off on system theme change.
Steps To Reproduce
- Start a fresh profile and install Dark Reader.
- Turn extension on and set
Change the browser theme
(More
tab) toCustom
; turn extension off again. - Set
Automation
(kebab menu) toUse system color scheme
. - Switch system dark mode on.
- Switch system dark mode off.
Expected Behavior
The extension turns on and then off on steps 4, 5.
Actual Behavior
The extension does turn on but remains so after switching the system to light mode again.
System Information
- OS: Manjaro 21.2.0 with i3wm (using xsettingsd to switch between
Adwaita
andAdwaita-dark
) - Browser: Firefox 95.0
- Dark Reader Version: 4.9.43
Additional Context
The bug appears to have surfaced with the upgrade to Firefox 95.0. I tried it with 91.4.0esr and could not reproduce it.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Make prefers-color-scheme respect the Firefox theme rather ...
Notable side effect: this would enable prefers-color-scheme: dark on OSes that don't currently have a dark mode (e.g. Linux, Windows 7 and 8)....
Read more >Firefox stuck in dark mode with a custom theme
Firefox 96 applies a dark color scheme to menus, the sidebar, the Library window, and various built-in pages if the color of text...
Read more >Use themes to change the look of Firefox - Mozilla Support
A theme changes the appearance of Firefox, such as the color scheme and background image of the toolbars. The color scheme of menus...
Read more >dark linux gtk theme makes pages look bad - Bugzilla@Mozilla
Un-check "Use System Colors" option in browser preferences, using default Firefox theme. 2. Choose Darklooks desktop theme in Gnome Appearance control panel ...
Read more >Mozilla Firefox Release Notes
Firefox Bug Fixes. v.16.0See the complete list of bugs fixed by the new version. ... 772883, System proxy settings on Linux in nightlies...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Update: when changing the
about:config
propertylayout.css.prefers-color-scheme.content-override
to2
(system) the bug is “solved” (but not actually resolved), which confirms the context of the recent Firefox change behind this. Here adding a UI element to change this property is discussed.This property’s value can be
0
dark,1
light,2
system or3
browser. When Dark Reader is set toUse system color scheme
automation and to overriding the browser theme withCustom
, this only works as expected whenlayout.css.prefers-color-scheme.content-override
is set to2
(system). On0
(dark) and1
(light) dark reader remains always on or off respectively. On3
(browser), which is default since 95.0, the behavior originally described in this issue is reproduced (unidirectional switch off > on).It seems likely that Dark Reader both relying on
prefers-color-scheme
and modifying the browser theme leads to a “lock” in the case of option3
, where it can turn itself on but then not off since it keeps the theme dark… I don’t really know about its internal design but I guess it should somehow rely directly on the system theme, regardless of the setting for websites. Is it at all possible?Thanks adql, it looks like setting
layout.css.prefers-color-scheme.content-override
to2
fixed the issue.