-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
postcss-preset-env deletes duplicate props / breaks linear gradients #1244
Comments
Hi @mnpenner, The underlying issue is upstream in The maintainers of There are multiple ways to resolve this :
I've also added test coverage for the example in your original post : 5576eb0 This illustrates how you can set |
I took a brief look at the upstream issue and I don't think it will be fixed :/ Removing prefixed values was always a dubious subfeature of I think it is better to use
closing because it is an upstream issue |
Hi @romainmenke, thanks for looking into this! The only reason I wanted autoprefixer to possibly remove prefixes is because I inherited a ton of old CSS and I didn't want to comb over it to modernize everything by hand. Otherwise I would just use the newest standard and let autoprefixer add the prefixes as needed. In that case, I will try the |
FYI, even with @supports ((-webkit-transform-style:preserve-3d) or (transform-style:preserve-3d)) {
.carousel-item-next.carousel-item-left, .carousel-item-prev.carousel-item-right {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0)
}
} Becomes
There is another option, |
Yeah, still an upstream issue in autoprefixer :) But thank you for the extra info here. |
Bug description
I have background-image defined 3 times in my source, 1 for each vendor prefix. postcss-preset-env is mangling it to only keep the last one. I don't care if it drops some outdated prefixes, but it no longer works in Chrome.
Source CSS
Expected CSS
Should include whatever permutations of linear-gradient that work in all the major browsers.
Actual CSS
Does it happen with
npx @csstools/csstools-cli <plugin-name> minimal-example.css
?Yes
Debug output
Too much reading. Ctrl+F "debug" doesn't show anything on that page.
Here's the output from my terminal without debug:
Extra config
No config.
What plugin are you experiencing this issue on?
PostCSS Preset Env
Plugin version
9
What OS are you experiencing this on?
Linux
Node Version
20
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: