Skip to content

Commit

Permalink
Document new cssnano API #56
Browse files Browse the repository at this point in the history
  • Loading branch information
maltsev committed Sep 13, 2018
1 parent 86f5441 commit 979f2c8
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,19 +188,18 @@ Minified:
Minifies CSS with [cssnano](http://cssnano.co/) inside `<style>` tags and `style` attributes.

##### Options
Css transforms are set to the `safe` option as a default (this should have very little side-effects):
```Json
"minifyCss": {
"safe": true
}
```
See [the documentation of cssnano](http://cssnano.co/optimisations/) for all supported optimizations.
By default CSS is minified with preset `default`, which shouldn't have any side-effects.

See [the documentation of cssnano](http://cssnano.co/optimisations/).
For example you can [keep outdated vendor prefixes](http://cssnano.co/optimisations/#discard-outdated-vendor-prefixes):
To use another preset or disabled some optimizations pass options to `minifyCss` module:
```js
htmlnano.process(html, {
minifyCss: {
autoprefixer: false
preset: ['default', {
discardComments: {
removeAll: true,
},
}]
}
});
```
Expand Down

0 comments on commit 979f2c8

Please sign in to comment.