Skip to content

Commit fecbdab

Browse files
Copilotrenemadsen
andcommitted
Improve SCSS specificity for Material Symbols style variants
Co-authored-by: renemadsen <[email protected]>
1 parent 29554e3 commit fecbdab

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

eform-client/src/scss/components/_icon.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ i, .mat-icon {
2222
&.material-symbols-outlined,
2323
&.material-symbols-rounded,
2424
&.material-symbols-sharp {
25-
// Default font variation settings
25+
// Default font variation settings (for 24px which is most common)
2626
font-variation-settings:
2727
'FILL' 0,
2828
'wght' 400,
@@ -74,14 +74,15 @@ i, .mat-icon {
7474
color: $eform-green-dark
7575
}
7676

77-
// Style variations for default size (24px)
78-
&.filled {
77+
// Style variations for default size (when no size class is specified)
78+
// These work when no md-* class is present
79+
&.filled:not(.md-18):not(.md-24):not(.md-36):not(.md-48) {
7980
font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
8081
}
81-
&.light {
82+
&.light:not(.md-18):not(.md-24):not(.md-36):not(.md-48) {
8283
font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
8384
}
84-
&.bold {
85+
&.bold:not(.md-18):not(.md-24):not(.md-36):not(.md-48) {
8586
font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' 0, 'opsz' 24;
8687
}
8788
}

0 commit comments

Comments
 (0)