Skip to content

Commit

Permalink
fix(material/icon): added styling for icon to ignore text-spacing
Browse files Browse the repository at this point in the history
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
  • Loading branch information
essjay05 committed Sep 24, 2024
1 parent 2164792 commit 4348041
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/material/icon/icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ mat-icon {
}
}

.mat-icon:has(div[style*="letter-spacing:"]):has(div[style*="word-spacing:"]) {
/* Apply styles to avoid text spacing */
letter-spacing: 0 !important;
word-spacing: 0 !important;
line-height: 1 !important;
}

// Icons that will be mirrored in RTL.
[dir='rtl'] .mat-icon-rtl-mirror {
transform: scale(-1, 1);
Expand Down

0 comments on commit 4348041

Please sign in to comment.