vanilla-hugo/assets/scss/fonts.scss
Danila Fedorin 2b7645a572 Generate instances of variable fonts
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2025-02-23 11:28:05 -08:00

47 lines
1.1 KiB
SCSS

@mixin font-inconsolata($weight) {
@font-face {
font-family: 'Inconsolata';
font-display: swap;
font-weight: $weight;
src: local('Inconsolata'),
url('../fonts/gen/Inconsolata-#{$weight}.woff2');
}
}
@mixin font-lora {
@font-face {
font-family: 'Lora';
font-display: swap;
src: local('Lora'),
url('../fonts/gen/Lora-Regular.woff2'),
url('../fonts/gen/Lora-Italic.woff2');
}
}
@mixin font-raleway($weight) {
@font-face {
font-family: 'Raleway';
font-display: swap;
font-weight: $weight;
src: local('Raleway'),
url('../fonts/gen/Raleway-#{$weight}.woff2'),
url('../fonts/gen/Raleway-#{$weight}-Italic.woff2');
}
}
@mixin font-stixgeneral {
@font-face {
font-family: 'STIXGeneral';
font-display: swap;
src: local('STIXGeneral-Regular'),
url('../fonts/STIXGeneral-Regular.ttf');
}
}
@include font-inconsolata(400);
@include font-inconsolata(700);
@include font-lora();
@include font-raleway(400);
@include font-raleway(700);
@include font-stixgeneral();