@@ -79,17 +79,21 @@ $format-names: (
79
79
}
80
80
81
81
/// Declares a `@font-face` block for each combination of weight, style, and unicode range.
82
- @mixin declare-font-faces ($family , $base-filename , $weights , $styles , $ranges , $formats ) {
82
+ @mixin declare-font-faces ($family , $base-filename , $weights , $styles , $ranges , $formats , $font-weight-override ) {
83
83
@each $weight in $weights {
84
84
@each $style in $styles {
85
85
@each $range in $ranges {
86
86
$font : font ($family , $weight , $style );
87
87
$filename : filename ($base-filename , $weight , $style );
88
+ $font-weight : $weight ;
89
+ @if ($font-weight-override != " " ) {
90
+ $font-weight : $font-weight-override ;
91
+ }
88
92
89
93
/* #{$font} - #{$range} */
90
94
@font-face {
91
95
font-family : $family ;
92
- font-weight : $weight ;
96
+ font-weight : $font- weight ;
93
97
font-style : $style ;
94
98
unicode-range : map-get ($unicode-ranges , $range );
95
99
src : local ($font ),
@@ -106,6 +110,7 @@ $format-names: (
106
110
$family : ' Alfa Slab One' ,
107
111
$base-filename : ' AlfaSlabOne' ,
108
112
$weights : 400 ,
113
+ $font-weight-override : 800 ,
109
114
$styles : normal ,
110
115
$ranges : latin latin- ext vietnamese,
111
116
$formats : woff2 woff,
@@ -115,6 +120,7 @@ $format-names: (
115
120
$family : ' Fira Sans' ,
116
121
$base-filename : ' FiraSans' ,
117
122
$weights : 400 600 800 ,
123
+ $font-weight-override : ' ' ,
118
124
$styles : normal italic ,
119
125
$ranges : map-keys ($unicode-ranges ),
120
126
$formats : woff2 woff,
0 commit comments