MudRating: Remove the grey block on click and color the ripple#13362
Merged
danielchalmers merged 1 commit intoJun 23, 2026
Merged
Conversation
Clicking a star painted a grey background over the entire rating (`.mud-rating-root:active`, which matches ancestors so any star greyed the whole block), and the per-item ripple fell back to grey `text-primary` because no `--mud-ripple-color` was set. - Drop `:active` from the root background rule (keep the `:focus-visible` keyboard affordance). - Set `--mud-ripple-color: currentColor` so the ripple matches the star color.
3 tasks
This was referenced Jun 27, 2026
Open
This was referenced Jun 29, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two grey artifacts appear when you click a star:
.mud-rating-root:activepaintsbackground-color: var(--mud-palette-action-default-hover)over the root. CSS:activematches the activated element and its ancestors, so clicking any star greys the entire group. (It was added in Fix sticky hover effects on mobile #8256 on top of the keyboard-focus rule from Rating: Keyboard Navigation #3399.)--mud-ripple-color, so it falls back to--mud-palette-text-primary(grey).Changes
:activefrom the root background rule; keep:focus-visibleas the keyboard focus affordance.--mud-ripple-color: currentColoron.mud-rating-itemso the ripple matches the star color instead of grey.Clicking a star no longer greys the whole block, and the ripple takes the star's color rather than grey.
Before
After
Checklist: