Skip to content

Commit aac40b2

Browse files
committed
fix(material/button): prevents mat-icon svg size and visibility issues (#32338)
Updates Angular Components Button component styling for mat-icon-buttons and all mat-fab-button variants. Only includes min-height of min-content for icons in other button variants so that when displaying svg icons such as fontawesome the height fits into the icon and is visible in safari browsers
1 parent 2724a15 commit aac40b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/material/button/button.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ $fallbacks: m3-button.get-tokens();
1010
.mat-mdc-button-base {
1111
text-decoration: none;
1212
// Makes button icon not cut off/shrink making the icon visible to fix b/411228600
13-
& .mat-icon {
13+
// Exclude icon button and FABs which have fixed dimensions to fix 32338
14+
&:not(.mat-mdc-icon-button):not(.mat-mdc-fab-base) .mat-icon {
1415
// stylelint-disable material/no-prefixes
1516
min-height: fit-content;
1617
flex-shrink: 0;

0 commit comments

Comments
 (0)