8
8
[ PostCSS Normalize] lets you use the parts of [ normalize.css] you need, based
9
9
on your project’s [ browserlist] .
10
10
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:
12
19
13
20
``` css
14
21
/* { "browserlist": ["last 3 versions"] } */
43
50
}
44
51
```
45
52
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
-
56
53
---
57
54
58
55
[ PostCSS Normalize] uses the non-opinionated version of [ normalize.css] .
@@ -150,6 +147,41 @@ grunt.initConfig({
150
147
});
151
148
```
152
149
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
+
153
185
[ npm-url ] : https://www.npmjs.com/package/postcss-normalize
154
186
[ npm-img ] : https://img.shields.io/npm/v/postcss-normalize.svg
155
187
[ cli-url ] : https://travis-ci.org/jonathantneal/postcss-normalize
@@ -166,3 +198,4 @@ grunt.initConfig({
166
198
167
199
[ browserlist ] : http://browserl.ist/
168
200
[ normalize.css ] : https://github.com/jonathantneal/normalize.css
201
+ [ Options ] : #Options
0 commit comments