@fontsource/material-symbols-sharp 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +3 -2
- package/scss/mixins.scss +12 -16
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fontsource/material-symbols-sharp",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Self-host the Material Symbols Sharp font in a neatly bundled NPM package.",
|
|
5
5
|
"main": "index.css",
|
|
6
6
|
"publishConfig": {"access": "public"},
|
|
@@ -25,5 +25,6 @@
|
|
|
25
25
|
"type": "git",
|
|
26
26
|
"url": "https://github.com/fontsource/font-files.git",
|
|
27
27
|
"directory": "fonts/google/material-symbols-sharp"
|
|
28
|
-
}
|
|
28
|
+
},
|
|
29
|
+
"publishHash": "3064fe8f3a8a7dcb"
|
|
29
30
|
}
|
package/scss/mixins.scss
CHANGED
|
@@ -30,20 +30,18 @@ $axes: null !default;
|
|
|
30
30
|
$styles: $styles,
|
|
31
31
|
$axes: $axes
|
|
32
32
|
) {
|
|
33
|
+
$isVariable: map.get($metadata, axes) != null;
|
|
34
|
+
|
|
33
35
|
$directory: if(
|
|
34
36
|
$directory,
|
|
35
37
|
$directory,
|
|
36
|
-
'~@fontsource#{if(
|
|
38
|
+
'~@fontsource#{if($isVariable, '-variable', '')}/#{map.get($metadata, id)}/files'
|
|
37
39
|
);
|
|
38
40
|
|
|
39
|
-
$family: if(
|
|
40
|
-
$family,
|
|
41
|
-
$family,
|
|
42
|
-
map.get($metadata, family) + if(map.get($metadata, axes), ' Variable', '')
|
|
43
|
-
);
|
|
41
|
+
$family: if($family, $family, map.get($metadata, family) + if($isVariable, ' Variable', ''));
|
|
44
42
|
$display: if($display, $display, swap);
|
|
45
43
|
$displayVar: if($displayVar != null, $displayVar, true);
|
|
46
|
-
$formats: if(not $formats or $formats == all, (woff2, woff), $formats);
|
|
44
|
+
$formats: if(not $formats or $formats == all, if($isVariable, woff2, (woff2, woff)), $formats);
|
|
47
45
|
$subsets: if(
|
|
48
46
|
$subsets,
|
|
49
47
|
if($subsets == all, map.get($metadata, subsets), $subsets),
|
|
@@ -62,25 +60,23 @@ $axes: null !default;
|
|
|
62
60
|
$axes: if(
|
|
63
61
|
$axes,
|
|
64
62
|
if($axes == all, full, $axes),
|
|
65
|
-
if(
|
|
63
|
+
if($isVariable, if(map.has-key($metadata, axes, wght), wght, full), null)
|
|
66
64
|
);
|
|
67
65
|
|
|
68
66
|
@each $subset in $subsets {
|
|
69
67
|
@each $unicodeSubset, $unicodeRange in map.get($metadata, unicode) {
|
|
70
68
|
@if (
|
|
71
|
-
$subset ==
|
|
72
|
-
$unicodeSubset or
|
|
69
|
+
($subset == $unicodeSubset) or
|
|
73
70
|
(
|
|
74
71
|
// Is numeric subset
|
|
75
|
-
$subset ==
|
|
76
|
-
map.get($metadata, defaults, subset) and not
|
|
72
|
+
($subset == map.get($metadata, defaults, subset)) and not
|
|
77
73
|
list.index(map.get($metadata, subsets), $unicodeSubset)
|
|
78
74
|
)
|
|
79
75
|
) {
|
|
80
76
|
@each $weight in if($axes, null, $weights) {
|
|
81
77
|
@each $axis in $axes {
|
|
82
78
|
@each $style in $styles {
|
|
83
|
-
$variant: '#{map.get($metadata, id)}-#{$unicodeSubset}-#{if($axis, $axis, $weight)}-#{$style}';
|
|
79
|
+
$variant: '#{map.get($metadata, id)}-#{if($unicodeSubset, $unicodeSubset, $subset)}-#{if($axis, $axis, $weight)}-#{$style}';
|
|
84
80
|
|
|
85
81
|
$src: ();
|
|
86
82
|
@each $format in $formats {
|
|
@@ -114,18 +110,18 @@ $axes: null !default;
|
|
|
114
110
|
|
|
115
111
|
font-family: string.quote($family),
|
|
116
112
|
font-style: if(
|
|
117
|
-
($axis == full or $axis == slnt) and map.has-key($metadata, axes, slnt),
|
|
113
|
+
(($axis == full) or ($axis == slnt)) and map.has-key($metadata, axes, slnt),
|
|
118
114
|
oblique map.get($metadata, axes, slnt, min) + deg map.get($metadata, axes, slnt, max) + deg,
|
|
119
115
|
$style
|
|
120
116
|
),
|
|
121
117
|
font-display: if($displayVar, var(--fontsource-display, $display), $display),
|
|
122
118
|
font-weight: if(
|
|
123
|
-
($axis == full or $axis == wght) and map.has-key($metadata, axes, wght),
|
|
119
|
+
(($axis == full) or ($axis == wght)) and map.has-key($metadata, axes, wght),
|
|
124
120
|
map.get($metadata, axes, wght, min) map.get($metadata, axes, wght, max),
|
|
125
121
|
$weight
|
|
126
122
|
),
|
|
127
123
|
font-stretch: if(
|
|
128
|
-
($axis == full or $axis == wdth) and map.has-key($metadata, axes, wdth),
|
|
124
|
+
(($axis == full) or ($axis == wdth)) and map.has-key($metadata, axes, wdth),
|
|
129
125
|
'#{map.get($metadata, axes, wdth, min)}% #{map.get($metadata, axes, wdth, max)}%',
|
|
130
126
|
null
|
|
131
127
|
),
|