Verified Commit aa90900d authored by Dan Allen's avatar Dan Allen
Browse files

fix declaration of font face for FontAwesome font

parent 989e89be
Pipeline #3488 canceled with stage
in 34 seconds
......@@ -36,7 +36,13 @@ module.exports = function (eleventyConfig, rest) {
postcssPresetEnv({ browsers: 'defaults,not IE 11' }),
(css, result) => {
result.root.walk((node) => {
if (node.type === 'decl' && node.prop === 'font-display') node.remove()
if (node.type === 'decl') {
if (node.prop === 'font-display') {
node.remove()
} else if (node.prop === 'src' && node.parent.name === 'font-face' && node.value.includes('.eot')) {
node.parent.remove()
}
}
})
return result
},
......
......@@ -106,13 +106,14 @@
}
#editorPreview i.fa {
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
font-family: FontAwesome;
hyphens: none;
display: inline-block;
}
#editorPreview span.icon > i.fa {
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
font: normal normal normal 1rem FontAwesome;
font-size: 1rem;
}
#editorPreview p code,
......
......@@ -9,3 +9,9 @@
@import "@fontsource/source-code-pro/latin-400.css";
@import "@fontsource/source-code-pro/latin-500.css";
@import "@fontsource/source-code-pro/latin-600.css";
@font-face {
font-family: 'FontAwesome';
src: url('./files/fontawesome-webfont.woff2') format('woff2');
font-weight: normal;
font-style: normal;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment