Skip to content

Commit 1901dea

Browse files
committed
refactor(material/icon): consolidate styles to ignore text-spacing
Updates previous change to consolidate the important styles that were added to ignore any externally placed text-spacing styles be added to be targeted by all .mat-icon situations. Fixes b/250063405
1 parent 248f39f commit 1901dea

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/material/icon/icon.scss

+6-8
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,6 @@ 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-
5548
// Icons that will be mirrored in RTL.
5649
[dir='rtl'] .mat-icon-rtl-mirror {
5750
transform: scale(-1, 1);
@@ -81,6 +74,11 @@ mat-icon {
8174
.mat-mdc-form-field .mat-icon,
8275
.mat-grid-tile .mat-icon,
8376
.mat-mdc-list-item .mat-icon,
84-
.mat-mdc-list-option .mat-icon {
77+
.mat-mdc-list-option .mat-icon,
78+
.mat-icon:has(div[style*='letter-spacing:']):has(div[style*='word-spacing:']) {
8579
overflow: visible;
80+
// Apply styles to avoid text spacing
81+
letter-spacing: 0 !important;
82+
word-spacing: 0 !important;
83+
line-height: 1 !important;
8684
}

0 commit comments

Comments
 (0)