Add a stylelint rule that requires the boolean `forced-colors` media query
Categories
(Developer Infrastructure :: Linting and Formatting: CSS, task)
Tracking
(Not tracked)
People
(Reporter: dao, Assigned: dao)
References
(Blocks 3 open bugs)
Details
Attachments
(3 external files)
(forced-colors: active) never matches browser chrome under Windows high contrast mode, where forced colors are in the requested state. In content it matches the same as (forced-colors).
This matters most for stylesheets that load in both realms, such as shared components or aboutwelcome.css, which feature callouts load into chrome: a block tested in content silently does nothing in chrome. The boolean query is right in both.
Add a use-boolean-forced-colors-query rule with an autofix, and convert the existing uses.
| Assignee | ||
Comment 1•12 days ago
|
||
(forced-colors: active) never matches browser chrome under Windows high contrast mode, which is in the requested state, and in content it is equivalent to the boolean query, so the sweep changes only Windows chrome under high contrast mode.
There, both blocks in smartwindowGroupTabs.css and the empty-state block in agent-monitor-panel.css start to apply, and feature callouts, which load aboutwelcome.css into chrome through FeatureCallout.sys.mjs, now get its picker, carousel-nav and multi-select system-color blocks.
Updated•12 days ago
|
| Assignee | ||
Comment 2•10 days ago
|
||
(forced-colors: active) never matches browser chrome under Windows high contrast mode, which is in the requested state, and in content it is equivalent to the boolean query, so this changes only Windows chrome under high contrast mode.
There, both blocks in smartwindowGroupTabs.css and the empty-state block in agent-monitor-panel.css start to apply, and feature callouts, which load aboutwelcome.css into chrome through FeatureCallout.sys.mjs, now get its picker, carousel-nav and multi-select system-color blocks.
| Assignee | ||
Comment 3•10 days ago
|
||
Comment 4•10 days ago
|
||
The following patch is waiting for review from an inactive reviewer:
| ID | Title | Author | Reviewer Status |
|---|---|---|---|
| D341043 | Bug 2090680 - Replace (forced-colors: active) with the boolean forced-colors media query. r?#desktop-theme-reviewers | dao | ngrato: Back Nov 21, 2026 |
:dao, could you please find another reviewer?
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•10 days ago
|
| Assignee | ||
Updated•3 days ago
|
Description
•