Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

postcss-minify-font-values

Package Overview
Dependencies
1
Maintainers
8
Versions
37
Issues
File Explorer

Advanced tools

postcss-minify-font-values

Minify font declarations with PostCSS

    5.1.0latest

Version published
Maintainers
8
Weekly downloads
10,081,186
decreased by-12.91%

Weekly downloads

Readme

Source

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

Keywords

FAQs

What is postcss-minify-font-values?

Minify font declarations with PostCSS

Is postcss-minify-font-values popular?

The npm package postcss-minify-font-values receives a total of 8,114,165 weekly downloads. As such, postcss-minify-font-values popularity was classified as popular.

Is postcss-minify-font-values well maintained?

We found that postcss-minify-font-values demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 8 open source maintainers collaborating on the project.

Last updated on 01 Mar 2022

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc