Closed Bug 1747423 Opened 4 years ago Closed 4 years ago

Remove preprocessor variable use of buttonStateHover, buttonStateHoverOrFocus and buttonStateActive

Categories

(Firefox :: Toolbars and Customization, task, P3)

Desktop
All
task
Points:
3

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox97 --- wontfix
firefox98 --- wontfix
firefox99 --- fixed

People

(Reporter: Gijs, Assigned: sfoster)

References

Details

(Whiteboard: [fidefe-2022-mr1-css-linting])

Attachments

(4 files)

+++ This bug was initially created as a clone of Bug #1747422 +++

This bug covers browser/themes/shared/customizableui/panelUI.inc.css and the macos file using the same replacement as part of selectors.

From a very quick look it seems like we could set a variable on the button, and update the variable for hover/focus that we then end up using for the text/icon. Alternatively, it looks like some of the selectors could be combined if we made more efficient use of classes.

Blocks: 1747424
No longer blocks: 1747424
Component: Themes → Toolbars and Customization
Product: Toolkit → Firefox
Summary: Remove preprocessor variable use of buttonStateHover and buttonStateHoverOrFocus → Remove preprocessor variable use of buttonStateHover, buttonStateHoverOrFocus and buttonStateActive
See Also: → 1747436
Severity: -- → S3
Priority: -- → P3

I'm trying to figure out a good path forward here. The selector-parts those variables represent are a little gnarly and error-prone - definitely the kind of thing it would be good to avoid duplicating across all the instances in those files. I can see managing a class on the button to replace the not([disabled],[open]]) bit, but that would still leave the need for a :not(:active) in each selector. Maybe that is enough to make the remainder bearable?

Assignee: nobody → sfoster
Status: NEW → ASSIGNED

:emilio and :ntim suggest trying to reverse the logic to end up with much simpler, more readable rules, along the lines of

button:hover { color: var(--hover-color) }
button:is([disabled],[open]) { color: inherit }

..I'll see if something like that might work in the various instances.

Points: --- → 3
Pushed by sfoster@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cdc88799f225 Remove the @buttonState* preprocessor vars from panel toolbarbuttons. r=dao https://hg.mozilla.org/integration/autoland/rev/fed0f04a2ae2 Remove the @buttonState* preprocessor vars from .subviewradio controls r=dao https://hg.mozilla.org/integration/autoland/rev/bbcd805fe7e3 Remove the @buttonState* preprocessor vars from zoom controls in panelUI.inc.css. r=dao https://hg.mozilla.org/integration/autoland/rev/41400853180c Remove the @buttonState* preprocessor %defines; remove vars from (macos only) .panel-buttons r=amy

Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: