postcss-minify-font-values-nightly

Minify font declarations with PostCSS

MIT 9 个版本
安装
npm install postcss-minify-font-values-nightly
yarn add postcss-minify-font-values-nightly
pnpm add postcss-minify-font-values-nightly
bun add postcss-minify-font-values-nightly
README

This is an un-official nightly release of cssnano's postcss-minify-font-values

In this, the package is named as postcss-minify-font-values-nightly

In from this docs, you need to replace every

postcss-minify-font-values --> postcss-minify-font-values-nightly


Original Docs below


postcss-minify-font-values Build Status

Minify font declarations with PostCSS.

This module will try to minimise the font-family, font-weight and font shorthand properties; it can unquote font families where necessary, detect & remove duplicates, and cut short a declaration after it finds a keyword. For more examples, see the tests.

h1 {
  font:bold 2.2rem/.9 "Open Sans Condensed", sans-serif;
}

p {
  font-family: "Helvetica Neue", Arial, sans-serif, Helvetica;
  font-weight: normal;
}
h1 {
  font:700 2.2rem/.9 Open Sans Condensed,sans-serif
}

p {
  font-family: Helvetica Neue,Arial,sans-serif;
  font-weight: 400;
}

API

minifyFontValues([options])

options

removeAfterKeyword

Type: boolean Default: false

Pass true to remove font families after the module encounters a font keyword, for example sans-serif.

removeDuplicates

Type: boolean Default: true

Pass false to disable the module from removing duplicated font families.

removeQuotes

Type: boolean Default: true

Pass false to disable the module from removing quotes from font families. Note that oftentimes, this is a safe optimisation & is done safely. For more details, see Mathias Bynens' article.

Usage

postcss([ require('postcss-minify-font-values') ])

See PostCSS docs for examples for your environment.

Contributors

See CONTRIBUTORS.md.

License

MIT © Bogdan Chadkin

版本列表
0.8.4 2020-08-04
0.8.1 2020-08-01
0.7.31 2020-07-31
0.7.25 2020-07-25
0.7.24 2020-07-24
0.7.8 2020-07-08
0.6.30 2020-06-30
0.6.27 2020-06-27
0.6.26 2020-06-26