Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yisibl opened this issue Jan 9, 2024 · 1 comment

Comments

@yisibl
Copy link
Member

yisibl commented Jan 9, 2024

/*
* 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%);
}
  • I'm not sure if -webkit-gradient supports this syntax, need to investigate further.
  • Interestingly, Firefox supports -webkit-linear-gradient(red 10%, 30%, blue 90%)
@ai
Copy link
Member

ai commented Jan 9, 2024

I will need PR for that optimization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants