Browse Source

update readme

pull/22/head
Ivan Bunin 7 years ago
parent
commit
fd6457fd99
  1. 19
      README.md

19
README.md

@ -2,6 +2,11 @@
A plugin for [PostCSS](https://github.com/ai/postcss) that generates viewport units (vw, vh, vmin, vmax) from pixel units.
## Install
```
$ npm install postcss-px-to-viewport --save-dev
```
## Usage
If your project involves a fixed width, this script will help to convert pixels into viewport units.
@ -113,7 +118,7 @@ Default:
- `mediaQuery` (Boolean) Allow px to be converted in media queries.
### Use with gulp-postcss
add to your gulp config:
```js
var gulp = require('gulp');
var postcss = require('gulp-postcss');
@ -133,3 +138,15 @@ gulp.task('css', function () {
.pipe(gulp.dest('build/css'));
});
```
### Use with Postcss configuration file
add to postcss.config.js
```js
module.exports = {
plugins: {
...
'postcss-px-to-viewport': {
// options
}
}
}
```
Loading…
Cancel
Save