Navigation Menu

Skip to content

Commit

Permalink
fix: Use browserslist-config-cozy instead of custom autoprefixer config
Browse files Browse the repository at this point in the history
In postcss config, we gave the browsers list to autoprefixer plugin
directly. But the `browsers` property is deprecated and will be removed
in next major version (see
https://github.com/postcss/autoprefixer/releases/tag/9.6.0).

We also use autoprefixer through autoprefixer-stylus, but it uses a very
old version of autoprefixer (7.1.0) that doesn't understand the `dead`
query that our browserslist config uses. A PR fixing this have been
merged and will hopefuly be released soon, see
jescalan/autoprefixer-stylus#180. That's why I
left the custom browserslist config for autoprefixer-stylus in
`build:css`, `build:css:utils` and `build:css:kss` scripts for now. But
we should upgrade this module and stop using a custom browserslist
config for it as soon as possible.
  • Loading branch information
Cyrille Perois committed Jul 26, 2019
1 parent 546c04b commit 5538fd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 4 additions & 1 deletion package.json
Expand Up @@ -187,5 +187,8 @@
"snapshotSerializers": [
"enzyme-to-json/serializer"
]
}
},
"browserslist": [
"extends browserslist-config-cozy"
]
}
3 changes: 0 additions & 3 deletions postcss.config.js
@@ -1,12 +1,9 @@
const browsers = require('browserslist-config-cozy')

module.exports = {
plugins: [
require('cssnano')({
preset: [
'advanced',
{
autoprefixer: { browsers },
mergeIdents: false,
reduceIdents: false,
zindex: false
Expand Down

0 comments on commit 5538fd7

Please sign in to comment.