|
1 | 1 | /**
|
2 | 2 | * Fontsource
|
3 |
| - * Fonts list : https://fontsource.org/fonts |
4 |
| - * Documentation : https://fontsource.org/docs/sass/mixins |
5 |
| - * For variable font : https://fontsource.org/docs/sass/variable-mixins |
| 3 | + * Fonts list : https://fontsource.org/ |
| 4 | + * Documentation : https://fontsource.org/docs/getting-started/faces-mixin |
6 | 5 | *
|
7 | 6 | * examples :
|
8 | 7 | *
|
9 | 8 | * 1 - Install the font by the command :
|
10 |
| - * yarn add @fontsource/lexend |
| 9 | + * // For Classic font |
| 10 | + * yarn add @fontsource/myFont |
11 | 11 | *
|
12 |
| - * 2 - Declare font-face : |
13 |
| - * @use "~@fontsource/lexend/scss/mixins" as Lexend; |
| 12 | + * // For Variable font |
| 13 | + * yarn add @fontsource-variable/myFont |
14 | 14 | *
|
| 15 | + * 2 - Declare font-face : |
15 | 16 | * // For Classic font
|
16 |
| - * @include Lexend.fontFace($weight: 400); |
17 |
| - * @include Lexend.fontFace($weight: 400, $style: italic); |
18 |
| - * @include Lexend.fontFace($weight: 700); |
| 17 | + * @use "~@fontsource/myFont/scss/mixins" as MyFont; |
| 18 | + * @include MyFont.faces($weights: (400, 700)); |
19 | 19 | * ...
|
20 | 20 | *
|
21 | 21 | * // For Variable font
|
22 |
| - * @include Lexend.fontFaceVariable($weight: 100 900); |
| 22 | + * @use "~@fontsource-variable/myFont/scss/mixins" as MyFont; |
| 23 | + * @include MyFont.faces($weights: 100 900); |
23 | 24 | * ...
|
24 | 25 | */
|
25 | 26 |
|
26 | 27 | @use "~@fontsource/poppins/scss/mixins" as Poppins;
|
27 | 28 |
|
28 |
| -@include Poppins.fontFace($weight: 300); |
29 |
| -@include Poppins.fontFace($weight: 300, $style: italic); |
30 |
| -@include Poppins.fontFace($weight: 400); |
31 |
| -@include Poppins.fontFace($weight: 400, $style: italic); |
32 |
| -@include Poppins.fontFace($weight: 500); |
33 |
| -@include Poppins.fontFace($weight: 500, $style: italic); |
34 |
| -@include Poppins.fontFace($weight: 700); |
35 |
| -@include Poppins.fontFace($weight: 700, $style: italic); |
| 29 | +@include Poppins.faces($weights: (300, 400, 500, 700), $styles: normal); |
| 30 | +@include Poppins.faces($weights: (300, 400, 500, 700), $styles: italic); |
36 | 31 |
|
37 | 32 | /**
|
38 | 33 | * Custom font here
|
|
0 commit comments