aboutsummaryrefslogtreecommitdiff
path: root/node_modules/postcss-minify-font-values/README.md
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-11-08 00:38:48 +0800
committerruki <waruqi@gmail.com>2018-11-07 21:53:09 +0800
commit26105034da4fcce7ac883c899d781f016559310d (patch)
treec459a5dc4e3aa0972d9919033ece511ce76dd129 /node_modules/postcss-minify-font-values/README.md
parent2c77f00f1a7ecb6c8192f9c16d3b2001b254a107 (diff)
downloadxmake-docs-26105034da4fcce7ac883c899d781f016559310d.tar.gz
xmake-docs-26105034da4fcce7ac883c899d781f016559310d.zip
switch to vuepress
Diffstat (limited to 'node_modules/postcss-minify-font-values/README.md')
-rw-r--r--node_modules/postcss-minify-font-values/README.md75
1 files changed, 75 insertions, 0 deletions
diff --git a/node_modules/postcss-minify-font-values/README.md b/node_modules/postcss-minify-font-values/README.md
new file mode 100644
index 00000000..35514455
--- /dev/null
+++ b/node_modules/postcss-minify-font-values/README.md
@@ -0,0 +1,75 @@
+# postcss-minify-font-values [![Build Status][ci-img]][ci]
+
+> 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](test).
+
+```css
+h1 {
+ font:bold 2.2rem/.9 "Open Sans Condensed", sans-serif;
+}
+
+p {
+ font-family: "Helvetica Neue", Arial, sans-serif, Helvetica;
+ font-weight: normal;
+}
+```
+
+```css
+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: `true`
+
+Pass `false` to disable the module from removing font families after it
+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][mathias].
+
+## Usage
+
+```js
+postcss([ require('postcss-minify-font-values') ])
+```
+
+See [PostCSS] docs for examples for your environment.
+
+MIT © [Bogdan Chadkin](mailto:trysound@yandex.ru)
+
+[mathias]: https://mathiasbynens.be/notes/unquoted-font-family
+[PostCSS]: https://github.com/postcss/postcss
+[ci-img]: https://travis-ci.org/TrySound/postcss-minify-font-values.svg
+[ci]: https://travis-ci.org/TrySound/postcss-minify-font-values