JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 163285
  • Score
    100M100P100Q179124F
  • License MIT

PostCSS plugin to transform W3C CSS font-family: system-ui to a practical font-family list

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

CSS Standard Status npm version Build Status Coverage Status Greenkeeper badge

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 --dev

Version

postcss postcss-font-family-system-ui
5.x 1.x
6.x 2.x

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