Autoprefixer
Parse CSS and add vendor prefixes to rules by Can I Use.
Installation
Install through vscode extensions. Search for Autoprefixer.
Configuration
settings.json
{
"autoprefixer.formatOnSave": false,
"autoprefixer.ignoreFiles": [
"**/*.min.css"
],
"autoprefixer.options": {
"browsers": [
"> 0.5%",
"last 2 versions",
"Firefox ESR",
"not dead"
]
},
}
Add vendor prefixes to CSS when you save a file.
{
"autoprefixer.formatOnSave": false,
}
An optional array of glob-patterns to ignore files.
{
"autoprefixer.ignoreFiles": [
"**/*.min.css"
],
}
Any options supported by autoprefixer.
{
"autoprefixer.options": {
"browsers": [
"> 0.5%",
"last 2 versions",
"Firefox ESR",
"not dead"
]
},
}
Troubleshooting
Disallow vendor prefixes for properties in .stylelintrc when autoprefixer.formatOnSave is set to true.
{
"rules": {
"property-no-vendor-prefix": null
}
}