Collect native CSS system-colors
Categories
(Core :: Privacy: Anti-Tracking, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox128 | --- | fixed |
People
(Reporter: tschuster, Assigned: tschuster)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
There are a number of CSS system-colors that we query from the operating system and might be modified by the user's theming options (Especially on Linux/GTK).
We have a list of all system-colors (typedef as ColorID
in C++) define in Rust here: SystemColor. Furthermore we have a list of system colors which we have hardcoded values for (so called stand-ins?): sNonNativeThemeStandinColors.
However we don't always use those hard-coded stand-ins, the most interesting condition is the check for high-contrast mode: aPrefs.NonNativeThemeShouldBeHighContrast(). I am not sure if we already collect this value. At first brush it seems different to prefers-contrast
.
Assignee | ||
Comment 1•2 months ago
|
||
Unless I made a mistake, I think we expose 66 colors. We probably don't need to collect all of them, but just those that are more commonly customized like Accentcolor
.
Comment 2•2 months ago
|
||
Most of those are not exposed, actually, the Headerbar colors for example are not parsed in content. The IME and attention colors are also not parsed due to this #[css(skip)]
here.
Assignee | ||
Comment 3•2 months ago
|
||
Nice, thanks emilio. I think that just leave us with:
Accentcolor
Accentcolortext
Canvas
Canvastext
Highlight
Highlighttext
Mark
Marktext
MozCellhighlight
MozCellhighlighttext
MozDialog
MozDialogtext
MozEventreerow
MozMenubarhovertext
MozMenuhover
MozMenuhovertext
MozOddtreerow
Selecteditem
Selecteditemtext
Comment 4•2 months ago
|
||
The Moz* ones we can probably unexpose from content at this point.
The Mark / MarkText ones are hard-coded already.
Canvas / CanvasText are prefable / settable from the color dialog in settings, but the defaults are also hard-coded in practice.
So that leaves Accentcolor, Highlight, and SelectedItem, which are all generally derived from the accent color.
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Comment 5•2 months ago
|
||
Pushed by tschuster@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3cc2f2927636 Collect native CSS system-colors. r=emilio,tjr
Comment 7•17 days ago
|
||
bugherder |
Description
•