Skip to content

Commit

Permalink
Docs: add 'options' section
Browse files Browse the repository at this point in the history
  • Loading branch information
smashercosmo committed Oct 6, 2017
1 parent ab64a68 commit f6a45d7
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ $ npm install postcss-responsive-hints
## Usage

```js
var postcss = require("postcss")
const postcss = require("postcss")

var output = postcss()
.use(require('postcss-responsive-hints')(/* options */))
const output = postcss()
.use(require('postcss-responsive-hints')({/* options */}))
.process(require("fs").readFileSync("input.css", "utf8"))
.css
```
Expand All @@ -24,15 +24,15 @@ Having the following styles in `input.css`:

```css
.test {
padding: 10px /* | 20px | x | 30px | */;
padding: 10px | 20px | x | 30px;
}
```

you will get:

```css
.test {
padding: 10px /* | 20px | x | 30px | */;
padding: 10px;
}

@media (min-width: 480px) {
Expand All @@ -50,6 +50,29 @@ you will get:
}
```

## Options

#### breakpoints: `Array<string>`

> default: `['480px', '768px', '1024px', '1200px']`
Provide a custom set of breakpoints

#### comments: `boolean`

> default: `false`
Allows to avoid non-standard syntax by wrapping responsive
hints in css comments

Example:

```css
.test {
padding: 10px /* | 20px | x | 30px | */;
}
```

## TODO

- Write better docs
Expand Down

0 comments on commit f6a45d7

Please sign in to comment.