This is deprecated API and will be dropped at some point, in favor of projects shipping their own CSS. Follow https://github.com/cockpit-project/starter-kit/blob/master/webpack.config.js approach on how to use PF CSS. Also: * Replace extract-text-webpack-plugin with mini-css-webpack-plugin as the former is deprecated: https://webpack.js.org/plugins/extract-text-webpack-plugin/#usage * Upgrade PF module dependency * Reduce the css files that are linked through webpack. Instead include from the JS the CSS files and let mini-css-extract-plugin do the rest of the work
36 lines
1.5 KiB
SCSS
36 lines
1.5 KiB
SCSS
/*
|
|
* Keep in sync with https://github.com/cockpit-project/cockpit/tree/master/src/base1/_fonts.scss
|
|
*/
|
|
|
|
@mixin printRedHatFont(
|
|
$weightValue: 400,
|
|
$weightName: "Regular",
|
|
$familyName: "RedHatText",
|
|
$style: "normal",
|
|
$relative: true
|
|
) {
|
|
$filePath: "../../static/fonts" + "/" + $familyName + "-" + $weightName;
|
|
@font-face {
|
|
font-family: $familyName;
|
|
src: url('#{$filePath}.woff2') format('woff2');
|
|
font-style: #{$style};
|
|
font-weight: $weightValue;
|
|
text-rendering: optimizeLegibility;
|
|
}
|
|
}
|
|
|
|
@include printRedHatFont(700, "Bold", $familyName: "RedHatDisplay");
|
|
@include printRedHatFont(700, "BoldItalic", $style: "italic", $familyName: "RedHatDisplay");
|
|
@include printRedHatFont(300, "Black", $familyName: "RedHatDisplay");
|
|
@include printRedHatFont(300, "BlackItalic", $style: "italic", $familyName: "RedHatDisplay");
|
|
@include printRedHatFont(300, "Italic", $style: "italic", $familyName: "RedHatDisplay");
|
|
@include printRedHatFont(400, "Medium", $familyName: "RedHatDisplay");
|
|
@include printRedHatFont(400, "MediumItalic", $style: "italic", $familyName: "RedHatDisplay");
|
|
@include printRedHatFont(300, "Regular", $familyName: "RedHatDisplay");
|
|
|
|
@include printRedHatFont(300, "Bold");
|
|
@include printRedHatFont(300, "BoldItalic", $style: "italic");
|
|
@include printRedHatFont(300, "Italic");
|
|
@include printRedHatFont(700, "Medium");
|
|
@include printRedHatFont(700, "MediumItalic", $style: "italic");
|
|
@include printRedHatFont(400, "Regular");
|