postcss / autoprefixer

Parse CSS and add vendor prefixes to rules by Can I Use
https://twitter.com/autoprefixer
MIT License
21.57k stars 1.25k forks source link

Avoid generating prefixes for browsers that don't support Gradient Midpoints #1505

Open yisibl opened 6 months ago

yisibl commented 6 months ago
/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.4.14,
* Autoprefixer: v10.4.7
* Browsers: > 0%
*/

.example {
    background: -webkit-gradient(linear, left top, left bottom, color-stop(10%, red), color-stop(30%), color-stop(90%, blue)); /* invalid */
    background: -webkit-linear-gradient(red 10%, 30%, blue 90%); /* invalid */
    background: -moz-linear-gradient(red 10%, 30%, blue 90%);
    background: -o-linear-gradient(red 10%, 30%, blue 90%); /* invalid */
    background: linear-gradient(red 10%, 30%, blue 90%);
}
ai commented 6 months ago

I will need PR for that optimization