Skip to content

Commit

Permalink
fix(button,button-toggle): ripples not clipping correctly in safari
Browse files Browse the repository at this point in the history
Fixes the ripples on buttons and button toggles not being clipped to the border radius in Safari.

Relates to #12244.
  • Loading branch information
crisbeto authored and jelbourn committed Aug 25, 2018
1 parent 3723191 commit 90e4db7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/button-toggle/button-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ $mat-button-toggle-border-radius: 2px !default;
position: relative;
display: inline-flex;
flex-direction: row;

border-radius: $mat-button-toggle-border-radius;

// Fixes the ripples not being clipped to the border radius on Safari.
transform: translateZ(0);

cursor: pointer;
white-space: nowrap;
overflow: hidden;
Expand Down
5 changes: 5 additions & 0 deletions src/lib/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@
border-radius: inherit;
}

.mat-button-ripple {
// Fixes the ripples not being clipped to the border radius on Safari.
transform: translateZ(0);
}

// Element that overlays the button to show focus and hover effects.
.mat-button-focus-overlay {
// The button spec calls for focus on raised buttons (and FABs) to be indicated with a
Expand Down

0 comments on commit 90e4db7

Please sign in to comment.