Ability to override prefers-color-scheme for web pages only
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox90 | --- | affected |
firefox91 | --- | fixed |
firefox92 | --- | fixed |
People
(Reporter: bernat, Unassigned)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
54.05 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0
Steps to reproduce:
On Linux:
- Use a GTK dark theme.
- Use "Dark" as Firefox theme
- Set ui.systemUsesDarkTheme to 0
Actual results:
- Web pages are not using the dark theme (good)
- Firefox interface mixes light and dark theme (not good)
Popup menus are white. Save dialog box is using a light theme, but some items are rendered as dark.
Expected results:
- Web pages are not using the dark theme
- Firefox is using the dark theme
I realize that I am lying by setting ui.systemUseDarkTheme
to 0. Up to Firefox 89, this was providing the expected result. I want to use a dark interface but I want the pages to be rendered as "light". Alternatively, there should be a dedicated setting to set prefers-color-scheme for web sites.
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.
Reporter | ||
Comment 2•3 years ago
|
||
This is definitely not the right approach, but using this patch, I get what I want: dark theme for interface, light theme for web pages. I can put a new preference settings for that if it would be accepted.
--- firefox-90.0.orig/dom/base/Document.cpp
+++ firefox-90.0/dom/base/Document.cpp
@@ -17160,7 +17160,7 @@ StylePrefersColorScheme Document::Prefer
const bool dark =
!!LookAndFeel::GetInt(LookAndFeel::IntID::SystemUsesDarkTheme, 0);
- return dark ? StylePrefersColorScheme::Dark : StylePrefersColorScheme::Light;
+ return StylePrefersColorScheme::Light;
}
// static
Also, see 1547818. I'd rather prefer a preference in about:config
, but I would also accept a web extension.
Comment 3•3 years ago
|
||
I could reproduce the issue in Firefox 90 under Ubuntu 18.04 64-bit.
However, this is already fixed in Firefox 91 beta 2 and latest Nightly 92.0a1.
Can you please give it a try? Thank you!
Reporter | ||
Comment 4•3 years ago
|
||
Hey!
Yes, it works just fine in Firefox 91 beta 2.
Thanks!
Comment 5•3 years ago
|
||
I checked with mozregression and found out that this bug was regressed by bug 1707957 in 90 and fixed by bug 1707872 in 91 (which will most probably ride the trains).
Updated•3 years ago
|
Updated•3 years ago
|
Description
•