Skip to content

Commit 63e7326

Browse files
committed
Update README.md for options
1 parent 3b750eb commit 63e7326

File tree

1 file changed

+44
-11
lines changed

1 file changed

+44
-11
lines changed

README.md

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@
88
[PostCSS Normalize] lets you use the parts of [normalize.css] you need, based
99
on your project’s [browserlist].
1010

11-
Example:
11+
Use `@import-normalize` to determine where [normalize.css] rules will be
12+
included. Duplicate `@import-normalize` rules will be removed. See all the [Options] for more information.
13+
14+
```css
15+
@import-normalize;
16+
```
17+
18+
Results:
1219

1320
```css
1421
/* { "browserlist": ["last 3 versions"] } */
@@ -43,16 +50,6 @@ img {
4350
}
4451
```
4552

46-
[PostCSS Normalize] will put itself at the beginning of your CSS file, unless
47-
you dictate where it should be included:
48-
49-
```css
50-
@import-normalize;
51-
```
52-
53-
Duplicate `@import-normalize` rules will be removed for your convenience. Only
54-
the first instance will be replaced.
55-
5653
---
5754

5855
[PostCSS Normalize] uses the non-opinionated version of [normalize.css].
@@ -150,6 +147,41 @@ grunt.initConfig({
150147
});
151148
```
152149

150+
## Options
151+
152+
### allowDuplicates
153+
154+
Allows you to insert multiple, duplicate insertions of [normalize.css] rules.
155+
The default is `false`.
156+
157+
```js
158+
require('postcss-normalize')({
159+
allowDuplicates: true
160+
});
161+
```
162+
163+
### browsers
164+
165+
Allows you to override of the project’s [browserlist] for [PostCSS Normalize].
166+
The default is `false`.
167+
168+
```js
169+
require('postcss-normalize')({
170+
browsers: 'last 2 versions'
171+
});
172+
```
173+
174+
### forceImport
175+
176+
Allows you to force an insertion of [normalize.css] rules at the beginning of
177+
the CSS file if no insertion point is specified. The default is `false`.
178+
179+
```js
180+
require('postcss-normalize')({
181+
forceImport: true
182+
});
183+
```
184+
153185
[npm-url]: https://www.npmjs.com/package/postcss-normalize
154186
[npm-img]: https://img.shields.io/npm/v/postcss-normalize.svg
155187
[cli-url]: https://travis-ci.org/jonathantneal/postcss-normalize
@@ -166,3 +198,4 @@ grunt.initConfig({
166198

167199
[browserlist]: http://browserl.ist/
168200
[normalize.css]: https://github.com/jonathantneal/normalize.css
201+
[Options]: #Options

0 commit comments

Comments
 (0)