Skip to content

fix(material/badge): remove badge opacity color mix #31213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 29, 2025

Conversation

andrewseguin
Copy link
Contributor

This matches M3 experience where disabled badges just include an opacity.

The intent here was to make a disabled badge look better on a disabled button by making it be opaque, but the mix makes it more difficult to use system colors. This also has to make an assumption about the background of the disabled element's container, which is not easily determined anyways. In this case, the button is more likely on a "surface" color anyways, since background is mostly used in other rare situations.

Note also that the M2/M3 spec does not consider disabled badges.

If it seems that this is a common enough UI problem, perhaps we can come up with a new system token about an opaque disabled color without the use of opacity

@andrewseguin andrewseguin requested a review from a team as a code owner May 24, 2025 11:47
@andrewseguin andrewseguin requested review from crisbeto and wagnermaciel and removed request for a team May 24, 2025 11:47
@andrewseguin andrewseguin added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels May 29, 2025
@andrewseguin andrewseguin merged commit 512433b into angular:main May 29, 2025
28 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: material/badge target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants