Skip to content

Commit

Permalink
fix(material/chips): ripple not clipped on safari (#21495)
Browse files Browse the repository at this point in the history
Fixes that the chip ripple wasn't being clipped to the border radius on Safari. This was
fixed initially in #12244, but it seems to have regressed. Moving the `transform` to the
ripple container seems to fix it.

(cherry picked from commit 73dde84)
  • Loading branch information
crisbeto authored and andrewseguin committed Mar 25, 2022
1 parent c677f11 commit 20af3e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/material/chips/chips.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ $chip-remove-size: 18px;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;

// Required for the ripple to clip properly in Safari.
transform: translateZ(0);

// Chips could be set on buttons so we need to reset the user agent styles.
border: none;
-webkit-appearance: none;
Expand Down Expand Up @@ -200,6 +197,9 @@ $chip-remove-size: 18px;

// Ensures that the ripple effect doesn't overflow the ripple target.
overflow: hidden;

// Required for the ripple to clip in Safari.
transform: translateZ(0);
}

.mat-chip-list-wrapper {
Expand Down

0 comments on commit 20af3e7

Please sign in to comment.