Skip to content

Commit 7b43d83

Browse files
committed
fix(material/icon): added styling for icon to ignore text-spacing
Updates previous fix to target instances where its parent element has or applied to it and to override any , , or changes to the so it should stay the same. Fixes b/250063405
1 parent 3b7dd64 commit 7b43d83

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/material/icon/icon.scss

+7
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ mat-icon {
4545
}
4646
}
4747

48+
.mat-icon:has(div[style*="letter-spacing:"]):has(div[style*="word-spacing:"]) {
49+
/* Apply styles to avoid text spacing */
50+
letter-spacing: 0 !important;
51+
word-spacing: 0 !important;
52+
line-height: 1 !important;
53+
}
54+
4855
// Icons that will be mirrored in RTL.
4956
[dir='rtl'] .mat-icon-rtl-mirror {
5057
transform: scale(-1, 1);

0 commit comments

Comments
 (0)