Implement non-blocking fonts
This commit is contained in:
@@ -78,3 +78,34 @@
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin font-face(
|
||||
$font-family,
|
||||
$file-path,
|
||||
$weight: normal,
|
||||
$style: normal,
|
||||
$asset-pipeline: $asset-pipeline,
|
||||
$file-formats: eot woff2 woff ttf svg) {
|
||||
|
||||
$user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
|
||||
$output-bourbon-deprecation-warnings: false !global;
|
||||
|
||||
$font-url-prefix: font-url-prefixer($asset-pipeline);
|
||||
|
||||
@font-face {
|
||||
font-family: $font-family;
|
||||
font-style: $style;
|
||||
font-weight: $weight;
|
||||
font-display: swap;
|
||||
|
||||
src: font-source-declaration(
|
||||
$font-family,
|
||||
$file-path,
|
||||
$asset-pipeline,
|
||||
$file-formats,
|
||||
$font-url-prefix
|
||||
);
|
||||
}
|
||||
|
||||
$output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user