Skip to content

Commit 29554e3

Browse files
Copilotrenemadsen
andcommitted
Fix SCSS: Preserve optical sizing for Material Symbols style variants
Co-authored-by: renemadsen <[email protected]>
1 parent 9a31fde commit 29554e3

File tree

1 file changed

+35
-5
lines changed

1 file changed

+35
-5
lines changed

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

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,46 @@ i, .mat-icon {
2222
&.material-symbols-outlined,
2323
&.material-symbols-rounded,
2424
&.material-symbols-sharp {
25+
// Default font variation settings
2526
font-variation-settings:
2627
'FILL' 0,
2728
'wght' 400,
2829
'GRAD' 0,
2930
'opsz' 24;
3031

31-
&.md-18 { font-size: 18px; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20; }
32-
&.md-24 { font-size: 24px; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
33-
&.md-36 { font-size: 36px; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 40; }
34-
&.md-48 { font-size: 48px; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48; }
32+
// Size-specific variations with appropriate optical sizing
33+
&.md-18 {
34+
font-size: 18px;
35+
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
36+
37+
&.filled { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20; }
38+
&.light { font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20; }
39+
&.bold { font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' 0, 'opsz' 20; }
40+
}
41+
&.md-24 {
42+
font-size: 24px;
43+
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
44+
45+
&.filled { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
46+
&.light { font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24; }
47+
&.bold { font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' 0, 'opsz' 24; }
48+
}
49+
&.md-36 {
50+
font-size: 36px;
51+
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 40;
52+
53+
&.filled { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 40; }
54+
&.light { font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 40; }
55+
&.bold { font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' 0, 'opsz' 40; }
56+
}
57+
&.md-48 {
58+
font-size: 48px;
59+
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;
60+
61+
&.filled { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48; }
62+
&.light { font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 48; }
63+
&.bold { font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' 0, 'opsz' 48; }
64+
}
3565

3666
&.material-icon-pointer {
3767
cursor: pointer;
@@ -44,7 +74,7 @@ i, .mat-icon {
4474
color: $eform-green-dark
4575
}
4676

47-
// Additional Material Symbols variations
77+
// Style variations for default size (24px)
4878
&.filled {
4979
font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
5080
}

0 commit comments

Comments
 (0)