Skip to content

Commit d8302a7

Browse files
authored
Making suggested changes
1 parent a2712ac commit d8302a7

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

docs/documentation/stories/autoprefixer.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,33 @@ or exclude certain browser versions from your build.
77
Internally, Autoprefixer relies on a library called [Browserslist](https://github.com/ai/browserslist)
88
to figure out which browsers to support with prefixing.
99

10-
To set a custom browserlist config, add the following to your `package.json` file:
10+
There are a few ways to tell Autoprefixer what browsers to target:
1111

12+
### Add a browserslist property to the `package.json` file
1213
```
1314
"browserslist": [
1415
"> 1%",
1516
"last 2 versions"
1617
]
1718
```
18-
Autoprefixer will look for the `browserlist` property and array of targets to use when it prefixes your css.
19+
20+
### Add a new file to the project directory called `.browserslistrc`
21+
```
22+
### Supported Browsers
23+
24+
> 1%
25+
last 2 versions
26+
```
27+
28+
Autoprefixer will look for the configuration file/property to use when it prefixes your css.
1929
Check out the [browserslist repo](https://github.com/ai/browserslist) for more examples of how to target
2030
specific browsers and versions.
2131

2232
_Side note:_
2333
Those who are seeking to produce a [progressive web app](https://developers.google.com/web/progressive-web-apps/) and are using [Lighthouse](https://developers.google.com/web/tools/lighthouse/) to grade the project will
2434
need to add the following browserslist config to their package.json file to eliminate the [old flexbox](https://developers.google.com/web/tools/lighthouse/audits/old-flexbox) prefixes:
35+
36+
`package.json` config:
2537
```
2638
"browserslist": [
2739
"last 2 versions",

0 commit comments

Comments
 (0)