Skip to content

Commit

Permalink
fix(material/icon): clip overflowing icon elements (#12429)
Browse files Browse the repository at this point in the history
Clips any elements that are overflowing an icon. This avoids issues where parts of the icon could stick out and layouts.

Fixes #11826.
  • Loading branch information
crisbeto committed Mar 10, 2022
1 parent 9e06e4a commit 025a534
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/material/icon/icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ $size: 24px !default;
height: $size;
width: $size;

// In some cases the icon elements may extend beyond the container. Clip these cases
// in order to avoid weird overflows and click areas. See #11826.
overflow: hidden;

&.mat-icon-inline {
font-size: inherit;
height: inherit;
Expand Down

0 comments on commit 025a534

Please sign in to comment.