Fallbacks for the W3C CSS generic
system-ui
font-family.Adapted from: https://github.com/JLHwung/postcss-font-family-system-ui
$ yarn add system-ui
# npm v5+
$ npm install system-ui
# before npm v5
$ npm install --save system-ui
import system_ui from "system-ui";
import { injectGlobal } from "styled-components";
// system_ui == "system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue"
injectGlobal`
body {
font-family: ${system_ui}, sans-serif;
font-size: 16px;
color: #000;
}
`;
-
Build:
yarn build
-
Pretty:
yarn pretty
MIT.