Document high contrast, chrome-versus-content and design-token behaviour in the front-end CSS docs
Categories
(Developer Infrastructure :: Source Documentation, task)
Tracking
(firefox158 fixed)
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: dao, Assigned: dao)
References
(Blocks 1 open bug)
Details
Attachments
(3 external files)
The CSS guidelines page covers high contrast mode in terms of the two automatic adjustments Gecko makes in the content area, and says nothing about the regimes that decide whether those adjustments happen at all, or about what the forced-color adjustment does to an individual declaration. Several behaviors front-end CSS has to account for are currently only learned by asking someone:
- Forced colors and
prefers-contrastare separate signals with separate sources, and a chrome document never actually forces colors, so a shared stylesheet takes a branch in anabout:page that it never takes in the toolbar. - The forced-color adjustment filters author colors per property, so
transparentsurvives as abackground-colorand becomesCanvasTextas aborder-color. - A layered token override loses to any unlayered declaration, which can leave a surface with no high contrast styling at all.
remis the system UI font size in chrome, not 16px, so the 16px-based space scale runs short there.- Every
*.tokens.cssis generated from the*.tokens.jsonbeside it, andmach buildtokensprunes Nova overrides as well as generating them.
This bug adds them to the pages that already have a section for each: docs/code-quality/coding-style/css_guidelines.md, the design-system token docs, and the use-design-tokens space rule page.
| Assignee | ||
Comment 1•2 months ago
|
||
The document_color_use Windows default in ColorsAndHighContrastMode.md said 2, against 0 in StaticPrefList.yaml, and the table added here contradicted it.
Updated•2 months ago
|
| Assignee | ||
Comment 2•2 months ago
|
||
| Assignee | ||
Comment 3•2 months ago
|
||
Comment 5•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f4435b59aef5
https://hg.mozilla.org/mozilla-central/rev/030bb75d0b2d
https://hg.mozilla.org/mozilla-central/rev/c417af1a30e9
Description
•