Skip to content

Commit 171a917

Browse files
committed
fix(button,button-toggle): ripples not clipping correctly in safari
Fixes the ripples on buttons and button toggles not being clipped to the border radius in Safari. Relates to #12244.
1 parent 04234f0 commit 171a917

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/lib/button-toggle/button-toggle.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ $mat-button-toggle-legacy-border-radius: 2px !default;
2020
overflow: hidden;
2121
border-radius: $mat-button-toggle-legacy-border-radius;
2222

23+
// Fixes the ripples not being clipped to the border radius on Safari.
24+
transform: translateZ(0);
25+
2326
@include cdk-high-contrast {
2427
outline: solid 1px;
2528
}

src/lib/button/button.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@
8989
border-radius: inherit;
9090
}
9191

92+
.mat-button-ripple {
93+
// Fixes the ripples not being clipped to the border radius on Safari.
94+
transform: translateZ(0);
95+
}
96+
9297
// Element that overlays the button to show focus and hover effects.
9398
.mat-button-focus-overlay {
9499
border-radius: inherit;

0 commit comments

Comments
 (0)