Skip to content

Commit

Permalink
fix(material/checkbox): ensure focus indicator has the correct shape (#…
Browse files Browse the repository at this point in the history
…30332)

The specificity for the checkbox's focus indicator was very low which means that if the ripple styles are loaded later, it can be overwritten.

Fixes #30326.

(cherry picked from commit 28aa37a)
  • Loading branch information
crisbeto committed Jan 16, 2025
1 parent eae0730 commit 5138fe7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/material/checkbox/checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@
}

// Checkbox components have to set `border-radius: 50%` in order to support density scaling
// which will clip a square focus indicator so we have to turn it into a circle.
.mat-mdc-checkbox-ripple::before {
// which will clip a square focus indicator so we have to turn it into a circle. Needs extra
// specificity in case the ripple styles are loaded later which can override the shape.
.mat-mdc-checkbox .mat-mdc-checkbox-ripple::before {
border-radius: 50%;
}

Expand Down

0 comments on commit 5138fe7

Please sign in to comment.