librealire/squelettes/scss/base/_fonts.scss
2020-12-19 20:48:50 +01:00

29 lines
1.2 KiB
SCSS

/// Font Face
/// https://gist.github.com/jonathantneal/d0460e5c2d5d7f9bc5e6#file-_mixins-scss
/// simplification pour uniquement woff2 et woff
@mixin font-face($name, $path, $weight: null, $style: null, $exts: woff2 woff) {
$src: null;
@each $ext in $exts {
$src: append($src, url(quote("../webfonts/" + $path + "." + $ext)) format(quote($ext)), comma);
}
@font-face {
font-family: quote($name);
font-style: $style;
font-weight: $weight;
src: $src;
}
}
/* fonts */
@include font-face(Fontawesome-s, fa-solid-900);
@include font-face(Fontawesome-b, fa-brands-400);
@include font-face(Merriweather, merriweather-light-webfont, 200, normal);
@include font-face(Merriweather, merriweather-lightitalic-webfont, 200, italic);
@include font-face(Merriweather, merriweather-regular-webfont, 400, normal);
@include font-face(Merriweather, merriweather-regularitalic-webfont, 400, italic);
@include font-face(Merriweather, merriweather-bold-webfont, 700, normal);
@include font-face(Merriweather, merriweather-bolditalic-webfont, 700, italic);
@include font-face(Merriweather, merriweather-black-webfont, 900, normal);
@include font-face(Merriweather, merriweather-blackitalic-webfont, 900, italic);