Skip to content

Commit 0c3e0eb

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 f9b9e25 commit 0c3e0eb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ $mat-button-toggle-border-radius: 2px !default;
1313
position: relative;
1414
display: inline-flex;
1515
flex-direction: row;
16-
1716
border-radius: $mat-button-toggle-border-radius;
1817

18+
// Fixes the ripples not being clipped to the border radius on Safari.
19+
transform: translateZ(0);
20+
1921
cursor: pointer;
2022
white-space: nowrap;
2123
overflow: hidden;

src/lib/button/button.scss

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

91+
.mat-button-ripple {
92+
// Fixes the ripples not being clipped to the border radius on Safari.
93+
transform: translateZ(0);
94+
}
95+
9196
// Element that overlays the button to show focus and hover effects.
9297
.mat-button-focus-overlay {
9398
// The button spec calls for focus on raised buttons (and FABs) to be indicated with a

0 commit comments

Comments
 (0)