This is the first change to start moving our settings to a config
approach. These settings are all checkboxes so only checkbox support is
added at this time.
In the future, these settings will be regrouped with other settings in
the Settings Redesign 2025 project. Moving the settings will involve
creating a new config with a different grouping of id/l10n/supportPage
values. It should not require moving any code or markup to move the
settings or convert them to using moz-checkbox rather than XUL checkbox.
Differential Revision: https://phabricator.services.mozilla.com/D240400
This patch changes the backing prefs by relying on the tristate offered
by browser.display.document_color_use instead of
browser.display.use_system_colors. This simplifies the color
decision tree, and offers a simplified UI.
The tristate preference offered to the user is as follows:
1. "Use platform's contrast settings" (document_color_use=0)
2. "Off" - never use HCM, regardless of platform setting (document_color_use=1)
3. "On" - always use HCM, regardless of platform setting (document_color_use=2)
Option 3 also reveals a colors UI for the user to choose the palette the
browser HCM will use (bg/text/link/visited).
There are three color palettes to choose from in light of the preference
above they are:
1. WIDGET_COLORS: The OS's configured colors used by its theme.
2. HARDCODED_COLORS: Colors deemed as standard and are hard coded into
Firefox (eg. white on black text, blue and purple links).
3. PREFERENCE_COLORS: Colors that are stored in preferences and are
configurable from the colors UI (eg. browser.visited_color and
browser.display.background_color)
The decision over which palette to use is as follows:
* If we are styling browser UI -> WIDGET_COLORS
* else, if resist fingerprinting is enabled -> HARDCODED_COLORS
* else, if document_color_use==0 AND OS HCM is on -> WIDGET_COLORS
* else, if document_color_use==2 -> PREFERENCE_COLORS
* else -> HARDCODED_COLORS
Differential Revision: https://phabricator.services.mozilla.com/D211115
This patch changes the backing prefs by relying on the tristate offered
by browser.display.document_color_use instead of
browser.display.use_system_colors. This simplifies the color
decision tree, and offers a simplified UI.
The tristate preference offered to the user is as follows:
1. "Use platform's contrast settings" (document_color_use=0)
2. "Off" - never use HCM, regardless of platform setting (document_color_use=1)
3. "On" - always use HCM, regardless of platform setting (document_color_use=2)
Option 3 also reveals a colors UI for the user to choose the palette the
browser HCM will use (bg/text/link/visited).
There are three color palettes to choose from in light of the preference
above they are:
1. WIDGET_COLORS: The OS's configured colors used by its theme.
2. HARDCODED_COLORS: Colors deemed as standard and are hard coded into
Firefox (eg. white on black text, blue and purple links).
3. PREFERENCE_COLORS: Colors that are stored in preferences and are
configurable from the colors UI (eg. browser.visited_color and
browser.display.background_color)
The decision over which palette to use is as follows:
* If we are styling browser UI -> WIDGET_COLORS
* else, if resist fingerprinting is enabled -> HARDCODED_COLORS
* else, if document_color_use==0 AND OS HCM is on -> WIDGET_COLORS
* else, if document_color_use==2 -> PREFERENCE_COLORS
* else -> HARDCODED_COLORS
Differential Revision: https://phabricator.services.mozilla.com/D211115
This patch makes us commit to the deemphasized color descriptive pattern throughout settings.
I also made some changes where some settings were using description and should most likely be using a label instead and vice versa.
Quick note that if the descriptive text is tied to an input such as a checkbox or toggle, as opposed to a section heading, we opt for the `.text-deemphasized` class/treatment where not only do we use the `--text-color-deemphasized` color but also shrink the font size. You'll see I opted for such treatment in the Experiments page checkbox list.
Differential Revision: https://phabricator.services.mozilla.com/D197615
This patch makes us commit to the deemphasized color descriptive pattern throughout settings.
I also made some changes where some settings were using description and should most likely be using a label instead and vice versa.
Quick note that if the descriptive text is tied to an input such as a checkbox or toggle, as opposed to a section heading, we opt for the `.text-deemphasized` class/treatment where not only do we use the `--text-color-deemphasized` color but also shrink the font size. You'll see I opted for such treatment in the Experiments page checkbox list.
Differential Revision: https://phabricator.services.mozilla.com/D197615
This is the only element in the deck which has plain inlines inside.
Make them a block, which is more similar to what the about dialog does
too, anyways.
Differential Revision: https://phabricator.services.mozilla.com/D194604
This is weirdly placed in the colors dialog, and adds a global selector
to the UA sheet for no great reason.
This sub-setting doesn't really make a lot of sense. We don't let you
force underlines in any way, so any site CSS will override it (unlike
colors, where you can actually override the site).
Just move this to the UA sheet properly.
Differential Revision: https://phabricator.services.mozilla.com/D188326