Skip to content

Commit 9177357

Browse files
Merge pull request #318 from krdln/alfa-slab-800
Set font-weight: 800 for Alfa Slab One @font-face
2 parents f14075d + 4104c0d commit 9177357

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/styles/fonts.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,21 @@ $format-names: (
7979
}
8080

8181
/// 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) {
8383
@each $weight in $weights {
8484
@each $style in $styles {
8585
@each $range in $ranges {
8686
$font: font($family, $weight, $style);
8787
$filename: filename($base-filename, $weight, $style);
88+
$font-weight: $weight;
89+
@if ($font-weight-override != "") {
90+
$font-weight: $font-weight-override;
91+
}
8892

8993
/* #{$font} - #{$range} */
9094
@font-face {
9195
font-family: $family;
92-
font-weight: $weight;
96+
font-weight: $font-weight;
9397
font-style: $style;
9498
unicode-range: map-get($unicode-ranges, $range);
9599
src: local($font),
@@ -106,6 +110,7 @@ $format-names: (
106110
$family: 'Alfa Slab One',
107111
$base-filename: 'AlfaSlabOne',
108112
$weights: 400,
113+
$font-weight-override: 800,
109114
$styles: normal,
110115
$ranges: latin latin-ext vietnamese,
111116
$formats: woff2 woff,
@@ -115,6 +120,7 @@ $format-names: (
115120
$family: 'Fira Sans',
116121
$base-filename: 'FiraSans',
117122
$weights: 400 600 800,
123+
$font-weight-override: '',
118124
$styles: normal italic,
119125
$ranges: map-keys($unicode-ranges),
120126
$formats: woff2 woff,

0 commit comments

Comments
 (0)