browser.theme.content-theme and browser.theme.toolbar-theme are reset on browser restart or theme change
Categories
(Firefox :: Theme, defect)
Tracking
()
People
(Reporter: fedin-ilja2010, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0
Steps to reproduce:
Multiple months ago Firefox UI switched to dark mode with most of installed themes on my machine, including the theme I use primarily - OldWood. I don't like dark modes, but having dark mode only in UI wasn't so annoying. After updating to 95.0b3, sites started to use dark mode, as well. Then, I asked for help at https://t.me/mozillian and they told me about browser.theme.content-theme and browser.theme.toolbar-theme options in about:config.
Actual results:
Switching both of them to 2 or only browser.theme.content-theme to 1 does help, but when theme change or browser restart happens, browser.theme.content-theme resets to 2 and browser.theme.toolbar-theme resets to 0. I tried to add them to my user.js, but that doesn't help either.
Expected results:
Both of the options or at least one of them shouldn't reset on its own.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Theme' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 2•3 years ago
|
||
Indeed, I can confirm that that the value of the preference "browser.theme.content-theme" is restarted if it's previously set to 1 - tested on Firefox 95 beta 4 on Ubuntu 20.04 x64. But the performance and the security of Firefox could be affected when changing the preferences in about:config, hence I'm not sure what Firefox's behavior should be in this case.
Harry, could you please take a look over and let us know if this is expected?
Ilya, Firefox 94 came with a lot of new themes, some of them even in lither tones. Did you have the chance to take a look over them? Just type and enter about:addons#themes in the address bar, you can also find more details here.
Updated•3 years ago
|
Comment 3•3 years ago
|
||
I believe those two prefs are from Emilio's work to improve dark mode support in Firefox. They don't have anything to do with the Colorways feature. Redirecting.
Comment 4•3 years ago
|
||
Yeah it's expected that those prefs are reset on startup etc. Those aren't the right prefs to change if you want to change the prefers-color-scheme behavior for websites, the pref to change is layout.css.prefers-color-scheme.content-override
: https://searchfox.org/mozilla-central/rev/364aa1d41eb9b5ea583fa6cedc56fb5343e3514f/modules/libpref/init/StaticPrefList.yaml#7267-7273
So this is working as intended.
Reporter | ||
Comment 5•3 years ago
|
||
I want native UI elements (like context menus, browser history) to be in light mode as well, layout.css.prefers-color-scheme.content-override doesn't seem to afect them. How can I force native UI elements to be in light mode as well?
Reporter | ||
Comment 6•3 years ago
|
||
My system theme is light, of course. But Firefox forces native UI elements in dark mode somehow.
Comment 7•3 years ago
|
||
Which Firefox and GTK theme are you using? (If you can provide a link to the gtk theme so I can test it it'd be great).
- If you're not using a Firefox theme (you're using the system theme), then we should be using whatever GTK theme you're using.
- If you're using a Firefox theme that is dark, then it is expected behavior to use dark colors for menus and co.
Reporter | ||
Comment 8•3 years ago
|
||
I use a Firefox theme that is not really dark, but Firefox thinks it's dark and I want to override that.
My Firefox theme: https://addons.mozilla.org/en-US/firefox/addon/oldwood/
My gtk theme: https://github.com/adapta-project/adapta-gtk-theme (Adapta-Eta)
Comment 9•3 years ago
|
||
(In reply to Ilya Fedin from comment #8)
I use a Firefox theme that is not really dark, but Firefox thinks it's dark and I want to override that.
My Firefox theme: https://addons.mozilla.org/en-US/firefox/addon/oldwood/
I see. Toolbar looks fairly dark to me, fwiw. The theme has this in the manifest:
"toolbar": "rgba(58, 40, 33, 0.43)",
"toolbar_text": "rgb(237, 192, 168)",
Which is clearly light text / dark background. The front-end uses this information to guarantee contrast and even though in this case it's probably not a big deal for the GTK theme to be light, it probably ought to be dark.
I found an interesting edge case which is that we fall back to the system theme when the theme provides no toolbar colors at all, so will centralize that code (and that way potentially we can provide an about:config
override).
Reporter | ||
Comment 10•3 years ago
|
||
Yeah, the toolbar looks dark, but if the toolbar is dark it doesn't mean the theme is dark. OldWood looks like a neutral theme: it can be used in both light and dark modes.
Reporter | ||
Comment 11•3 years ago
|
||
does toolbar mean url bar or entire panel with tabs and etc? The url bar looks dark, while all other parts don't. The background is an image that doesn't look dark.
Comment 13•3 years ago
|
||
Look here, prior to the 96.0 update everything was in light mode. Now I find myself forced into it, with one of the two suggested modifications not holding between restarts (or indeed over a period of inactivityy), and furthermore the black screen while a page loads apparently can't be turned off - it's much more disturbing to the eyes than white between pages which are mostly white anyway.
I object to having dark mode forced on me, and it shouldn't be necessary to have to make involved alterations to about:config or css which many people wouldn't have the skill to do. If you want to offer dark mode as an alternative, fine, some people like it, and you could make it an option in the preferences. But forcing it on people is the sort of attitude one tends to associate with Apple, not Mozilla, and I don't like it, and I don't appreciate being told it's closed/resolved/expected behaviour.
Comment 14•3 years ago
|
||
Look here, prior to the 96.0 update everything was in light mode. Now I find myself forced into dark mode, with one of the two suggested modifications not holding between restarts (or indeed over a period of inactivityy), and furthermore the black screen while a page loads apparently can't be turned off - it's much more disturbing to the eyes than white between pages which are mostly white anyway.
I object to having dark mode forced on me, and it shouldn't be necessary to have to make involved alterations to about:config or css which many people wouldn't have the skill to do. If you want to offer dark mode as an alternative, fine, some people like it, and you could make it an option in the preferences. But forcing it on people is the sort of attitude one tends to associate with Apple, not Mozilla, and I don't like it, and I don't appreciate being told it's closed/resolved/expected behaviour.
Comment 15•3 years ago
|
||
Bug 1749837 has a proposal to allow themes to override our heuristics.
Comment 16•3 years ago
|
||
FWIW, it's a common topic in Firefox support. As a workaround you could use enterprise policies to lock the preference, then it survives a browser restart.
"policies": {
"Preferences": {
"browser.theme.toolbar-theme": {
"Value": 1,
"Status": "locked"
}
}
}
}`
Description
•