Skip to content

Commit 90e4db7

Browse files
crisbetojelbourn
authored andcommitted
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 3723191 commit 90e4db7

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
@@ -91,6 +91,11 @@
9191
border-radius: inherit;
9292
}
9393

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

0 commit comments

Comments
 (0)