Package Exports
- postcss-font-family-system-ui
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postcss-font-family-system-ui) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
postcss-font-family-system-ui
PostCSS plugin to transform W3C CSS generic font-family system-ui to a practical font-family list
Installation
yarn add postcss-font-family-system-ui
Usage
// dependencies
import postcss from 'postcss'
import fontFamilySystemUI from 'postcss-font-family-system-ui'
// css to be processed
const css = fs.readFileSync("input.css", "utf8")
// process css using postcss-font-family-system-ui
const out = postcss()
.use(fontFamilySystemUI())
.process(css)
.css
Using this input.css
:
body {
font-family: system-ui;
}
you will get:
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue;
}
Checkout tests for examples.
FAQ
Can I use require('postcss-font-family-system-ui')
?
Yes