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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants