Skip to content

Commit 2030bac

Browse files
committed
fix(material/icon): changes overflow to visible for button icon
Updates styles for Angular Material Icon so when the icon is within a button it sets the overflow to visible to avoid the icon from being cutoff. Also updates the line-height to 1 set Fixes b/250063405
1 parent 43ac1f7 commit 2030bac

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: src/material/icon/icon.scss

+9
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ mat-icon {
5151
transform: scale(-1, 1);
5252
}
5353

54+
// Makes button icon overflow visible to fix b/250063405
55+
.mat-mdc-icon-button .mat-icon,
56+
.mdc-button .mat-icon,
57+
.mat-mdc-fab-base .mat-icon {
58+
overflow: visible;
59+
line-height: 1 !important;
60+
}
61+
5462
.mat-form-field:not(.mat-form-field-appearance-legacy) {
5563
.mat-form-field-prefix,
5664
.mat-form-field-suffix {
@@ -60,6 +68,7 @@ mat-icon {
6068

6169
.mat-icon-button .mat-icon {
6270
margin: auto;
71+
overflow: visible;
6372
}
6473
}
6574
}

0 commit comments

Comments
 (0)