Firefox uses Windows theme colors and makes websites ugly if they are altered via external software / the registry.
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
People
(Reporter: realnurudinimsirovic, Unassigned)
References
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0
Steps to reproduce:
Preamble
I am running a heavily modified version of Windows.
The specific issue seems to be related to the theme I'm using that changes the entire color palette of the Windows theme to be completely dark.
Though the fact that my system is modified/patched does not matter, as I've found a way to easily reproduce the issue without 3rd-party tools.
How to reproduce?
- Open Registry Editor (
C:\windows\system32\regedit.exe
) - Navigate to
HKCU\Control Panel\Colors
- Make a note of the value for
Window
andWindowText
key (you'll need them for backup or else you're gonna be left with an ugly theme) - Set
Window
to255 0 0
and WindowText to0 0 0
- Log off and log back on
- Open
bug.htm
that's attached in the ZIP archive. - See that the background is Red and the text is Black (unexpected)
- Open that same file in Google Chrome and see that the background is White and the color is Black (expected)
How to revert the theme changes
To fix your Windows theme, simply revert the values back to their defaults (hopefully you took notes of them.)
Actual results:
Firefox uses system theme colors from the registry to assign (default) color values for common controls (background, text, etc)
Here are screenshots comparing Firefox and Google Chrome:
Keep in mind that the page source has not changed at all, both files are exactly the same.
This change is not affected by the theme options within the browser, setting the Light theme in Firefox does not affect this.
Expected results:
The colors of pages should not change based on the theme changes outside of the browser, unless we're talking about the CSS query prefers-color-scheme
which is again an optional rule that's specified by the website and not enforced by the web browser.
Reporter | ||
Comment 1•1 year ago
|
||
Reporter | ||
Comment 2•1 year ago
|
||
As a side note, this may also affect other pages that have not defined color properties on their elements.
Some websites appear gray with the black text. It is difficult to find pages that do this, but when they do it's really annoying.
Here's a real website that has this issue. The entire background is red.
Comment 3•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Theme' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 4•1 year ago
|
||
I was able to reproduce the issue on Win11x64 using FF build 118.0a1 (august 10th) and doing the settings from description.
Marking issue as new.
Updated•1 year ago
|
Comment 5•1 year ago
|
||
Comment 6•1 year ago
|
||
Comment 7•1 year ago
|
||
Hey there's no CSS bugzilla module?
Gfx team wonders if this is a choice on the part of our CSS default colors with respect to system theme settings?
Comment 8•1 year ago
|
||
Does this repro on a clean profile? Window / WindowText should effectively be spoofed here.
The default background is different tho. browser.display.use_system_colors
is controllable from the settings UI and default on on windows here.
The reason we needed this was for HCM to work by default, effectively, see bug 1593273. Tweaking colors via the registry is not a particularly well-supported configuration, but maybe we can change the default back? Morgan, fyi since this is sort of related to the color settings work you are investigating?
Comment 9•1 year ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #8)
Does this repro on a clean profile? Window / WindowText should effectively be spoofed here.
Does this only happen if a user is using standins? I'd have thought we pull the windows colors like we do here.
The reason we needed this was for HCM to work by default, effectively, see bug 1593273. Tweaking colors via the registry is not a particularly well-supported configuration, but maybe we can change the default back? Morgan, fyi since this is sort of related to the color settings work you are investigating?
I think it's important to keep this setting as-is for HCM users. We're doing some work to revamp the color dialog and currently analysing usage of this setting in particular (across all platforms). I'll bookmark this bug as part of that discussion.
Comment 10•1 year ago
|
||
does this issue resolve if you uncheck "Use system colors" in about:preferences
> Manage colors ?
what if you set ui.use_standins_for_native_colors
to true in about:config
?
what happens if you do both of those things ?
Reporter | ||
Comment 11•1 year ago
|
||
(In reply to Morgan Reschenberg [:morgan] from comment #10)
does this issue resolve if you uncheck "Use system colors" in
about:preferences
> Manage colors ?
what if you setui.use_standins_for_native_colors
to true inabout:config
?
what happens if you do both of those things ?
With Use system colors
and ui.use_standins_for_native_colors
it successfully solves the problem.
Each website is displaying correct colors so far
Updated•1 year ago
|
Description
•