@csstools/postcss-system-ui-font-family
Use the `system-ui` keyword
Last updated 10 days ago by romainmenke .
MIT-0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @csstools/postcss-system-ui-font-family 
SYNC missed versions from official npm registry.

PostCSS System UI Font Family PostCSS Logo

npm install @csstools/postcss-system-ui-font-family --save-dev

PostCSS System UI Font Family lets you use the system-ui keyword following the CSS Fonts 4 Specification.

.foo {
	font: italic bold 12px/30px system-ui;
	font-family: system-ui;
	--font-family: system-ui;
}

/* becomes */

.foo {
	font: italic bold 12px/30px system-ui;
	font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
	--font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
}

Usage

Add PostCSS System UI Font Family to your project:

npm install postcss @csstools/postcss-system-ui-font-family --save-dev

Use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssSystemUIFontFamily = require('@csstools/postcss-system-ui-font-family');

postcss([
	postcssSystemUIFontFamily(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);

Options

preserve

The preserve option determines whether the original notation is preserved. By default, it is preserved.

postcssSystemUIFontFamily({ preserve: false })
.foo {
	font: italic bold 12px/30px system-ui;
	font-family: system-ui;
	--font-family: system-ui;
}

/* becomes */

.foo {
	font: italic bold 12px/30px system-ui;
	font-family: -apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
	--font-family: -apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
}

Current Tags

  • 2.0.4                                ...           latest (10 days ago)

6 Versions

  • 2.0.4                                ...           10 days ago
  • 2.0.3                                ...           2 months ago
  • 2.0.2                                ...           2 months ago
  • 2.0.1                                ...           2 months ago
  • 2.0.0                                ...           10 months ago
  • 1.0.0                                ...           a year ago
Downloads
Total 10
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 0
Last Month 5
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE