postcss-fixes
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "postcss-fixes", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "PostCSS plugin to fix known Browser Bugs.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
# PostCSS Fixes [![Build Status][ci-img]][ci] [](https://codeclimate.com/github/MattDiMu/postcss-fixes) [] (https://david-dm.org/MattDiMu/postcss-fixes) [](https://david-dm.org/MattDiMu/postcss-fixes) | ||
[PostCSS]: https://github.com/postcss/postcss | ||
[ci-img]: https://travis-ci.org/MattDiMu/postcss-fixes.svg | ||
[ci]: https://travis-ci.org/MattDiMu/postcss-fixes | ||
[PostCSS] pack to fix known Browser Bugs, making it easier to write your CSS according to the official W3C Syntax. | ||
@@ -38,19 +42,40 @@ | ||
### Recommended Usage | ||
[postcss-fixes](https://github.com/MattDiMu/postcss-fixes) is recommended to be used in conjunction with [autoprefixer](https://github.com/postcss/autoprefixer) and [cssnano](https://github.com/ben-eb/cssnano) (optimizations) | ||
[PostCSS]: https://github.com/postcss/postcss | ||
[ci-img]: https://travis-ci.org/MattDiMu/postcss-fixes.svg | ||
[ci]: https://travis-ci.org/MattDiMu/postcss-fixes | ||
```js | ||
/* for developement */ | ||
postcss([ | ||
require('postcss-fixes')(), | ||
require('autoprefixer')() | ||
]) | ||
/* for production */ | ||
postcss([ | ||
require('postcss-fixes')(), | ||
require('autoprefixer')(), | ||
require('cssnano')({ | ||
'safe': true, // I would recommend using cssnano only in safe mode | ||
'calc': false // calc is no longer necessary, as it is already done by postcss-fixes due to precision rounding reasons | ||
}) | ||
]) | ||
``` | ||
See [PostCSS](https://github.com/postcss/postcss) docs for examples for your environment (e.g. if you are using a task runner like grunt, gulp, broccoli, webpack, etc.). | ||
## Usage | ||
## Options | ||
### `preset` | ||
* `recommended` (default) | ||
* `safe` | ||
* `fixes-only` | ||
* `fallbacks-only` | ||
* `enable-all` | ||
* `disable-all` | ||
```js | ||
postcss([ require('postcss-fixes') ]) // do recommended transformations | ||
``` | ||
This would look like this: | ||
```js | ||
postcss([ require('postcss-fixes')({ preset: 'safe' }) ]) // do only very safe transformations | ||
postcss([ | ||
require('postcss-fixes')({ preset: 'safe' }) // do only very safe transformations | ||
]) | ||
``` | ||
See [PostCSS](https://github.com/postcss/postcss) docs for examples for your environment. |
10130
81