Closed Bug 2084656 Opened 1 month ago Closed 18 days ago

Make toolbar button icons and high contrast menu and disabled text follow the surrounding text color

Categories

(Toolkit :: Themes, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: dao, Assigned: dao)

References

(Blocks 1 open bug)

Details

Attachments

(3 external files)

Outside Nova, toolbar button icons use fixed grays (color.gray.70 in light, color.gray.0 in dark). Under prefers-contrast, disabled ghost button text and menu item text use fixed colors too. On a surface whose text color differs, these don't match the text around them. For example, under prefers-contrast the app menu panel paints CanvasText, but its enabled items keep a fixed color.

Deriving these values from currentColor makes them follow the surface they're drawn on. The light icon fill becomes a color-mix() of currentColor with transparent. Nova keeps its fixed icon colors.

The light icon fill mixes 69% of currentColor with transparent, which matches the old color.gray.70 over the default light toolbar. Nova keeps its fixed icon colors, so the fill rules stay in @media (forced-colors).

Outside Nova in light, hovered and pressed icons get 12-27 levels darker because the translucent fill composites over the hover and active backgrounds. Under prefers-contrast, menu items take the panel's text color.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED

Figma's dark values for disabled, hovered, pressed and selected menu items never painted: in chrome the ghost tokens are inherit, which invalidates the whole light-dark() so the color inherits, and in-content both sides already resolve to the same color.

A token set to inherit leaves the custom property empty, so it only works where no light-dark() or color-mix() wraps it; currentColor stays valid there. Every reader sets color, where the two compute the same.

Blocks: 2085254
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0758b1907e68 https://hg.mozilla.org/integration/autoland/rev/0f079dcf7835 Make toolbar button icons and high contrast menu and disabled text follow the surrounding text color. r=desktop-theme-reviewers,reusable-components-reviewers,akulyk
Keywords: leave-open
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/90a8e1dacc5c https://hg.mozilla.org/integration/autoland/rev/0cfd3c4b72db Use the ghost text colors for menu items in Nova dark too (no visible change). r=desktop-theme-reviewers,reusable-components-reviewers,akulyk https://github.com/mozilla-firefox/firefox/commit/e6662ff5ac4b https://hg.mozilla.org/integration/autoland/rev/88264fa6f286 Use currentColor for the ghost and menu text colors that follow the surrounding text (no visible change). r=desktop-theme-reviewers,reusable-components-reviewers,akulyk
Status: ASSIGNED → RESOLVED
Closed: 18 days ago
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
QA Whiteboard: [qa-triage-done-c162/b161]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: