Answer the question
In order to leave comments, you need to log in
How to set ignore for SCSS font mixin in stylelint?
There is a SCSS mixin for generating fonts
@mixin font-face($name, $path, $weight: null, $style: null, $exts: eot woff2 woff ttf svg) {
$src: null;
$extmods: (
eot: "?",
svg: "#" + str-replace($name, " ", "_")
);
$formats: (
otf: "opentype",
ttf: "truetype"
);
@each $ext in $exts {
$extmod: if(map-has-key($extmods, $ext), $ext + map-get($extmods, $ext), $ext);
$format: if(map-has-key($formats, $ext), map-get($formats, $ext), $ext);
$src: append($src, url(quote($path + "." + $extmod)) format(quote($format)), comma); /* stylelint-disable-line function-url-quotes */
}
@font-face {
font-family: quote($name);
src: $src;
font-weight: $weight;
font-style: $style;
// font-display: block;
font-display: swap;
}
}
@include font-face("Montserrat", "/app/fonts/Montserrat/Montserrat-Regular", normal, normal, woff2 woff);
@include font-face("Montserrat", "/app/fonts/Montserrat/Montserrat-Bold", bold, normal, woff2 woff);
$src: append($src, url(quote($path + "." + $extmod)) format(quote($format)), comma);
url(quote
? "function-url-quotes": ["always", {
"ignorePattern": "url(quote"
}],
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question