Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Cherry pick "Wrap button :focus, :hover and :active styles in :enabled (#584)"#588

Merged
lucaswerkmeister merged 1 commit intonextfrom
next-enabled
May 24, 2022
Merged

Cherry pick "Wrap button :focus, :hover and :active styles in :enabled (#584)"#588
lucaswerkmeister merged 1 commit intonextfrom
next-enabled

Conversation

@lucaswerkmeister
Copy link
Copy Markdown
Member

Firefox allows a button to be :disabled and still have :focus, if it was
programmatically disabled while focused. In this case, the :focus styles
would beat the :disabled styles, since they have higher specificity; we
want disabled buttons to always look disabled, though, so wrap all the
other styles in :enabled so they only apply when wanted.

The stylelint rule max-nesting-depth (max depth: 3), which complains
about the change, is disabled – the alternative solutions (combining
selectors together) seem worse to us in this case.

Bug: T304511

#584)"

Firefox allows a button to be :disabled and still have :focus, if it was
programmatically disabled while focused. In this case, the :focus styles
would beat the :disabled styles, since they have higher specificity; we
want disabled buttons to always look disabled, though, so wrap all the
other styles in :enabled so they only apply when wanted.

The stylelint rule max-nesting-depth (max depth: 3), which complains
about the change, is disabled – the alternative solutions (combining
selectors together) seem worse to us in this case.

Bug: T304511
@lucaswerkmeister lucaswerkmeister requested a review from micgro42 May 24, 2022 09:37
@lucaswerkmeister
Copy link
Copy Markdown
Member Author

Cherry-picks #584.

@github-actions
Copy link
Copy Markdown

@lucaswerkmeister lucaswerkmeister merged commit 69f493e into next May 24, 2022
@lucaswerkmeister lucaswerkmeister deleted the next-enabled branch May 24, 2022 10:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants