You can change the options for the auto-prefixer using postcss
Nov 4, 2019
6
Level 1
Laravel Mix
May I know the right way to enable the autoprefixer work on every css which needed to add? My laravel mix autoprefixer only work on some element. For example,
.sample {
display: flex;
transition: all .5s;
user-select: none;
background: linear-gradient(to bottom, white, black);
height: 300px;
}
.sample {
display: flex;
transition: all 0.5s;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background: linear-gradient(to bottom, white, black);
height: 300px;
}
How can I solve this?
Level 102
Well that depends. Do you need to support the last 10 versions of all browsers?
If you need to be more specific you can pass multiple keys to that array
mix.options({
postCss: [
require('autoprefixer')({
browsers:[
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version",
"last 1 ie version"
]
})
]
});
Please or to participate in this conversation.