-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Rules duplicate when moz-placeholder prefix added #1497
Comments
I can’t reproduce it on https://autoprefixer.github.io/ Maybe you are using some old Autoprefixer or have any other problem in environment. Try to reproduce issue in s simplest new project. |
I can reproduce it there. Looks like it gets duplicated when it gets formatted to match our style (each on own line). If you feed that back in again, it'll add it again. So if you enter
You'll get the output of
We format that with prettier to
Put that back in the autoprefixer and it'll generate
|
Yes, Autoprefixer duplication prevention works only if you pass exact output. Unfortunately, duplication prevention is not a priority for me. You will need to debug the code and send PR. Here is a block where you need to work https://github.com/postcss/autoprefixer/blob/main/lib/selector.js#L89-L119 Ask any questions if you will have them during the work. |
Everytime the autoprefixer is run on the following bit of CSS, the moz-placeholder prefixes are added above (even if they already exist).
postcss ./**/*.css -u autoprefixer --no-map --base . --dir ./
They are multiplying everytime it runs...
After a few runs in GitHub actions with the following browserslist
> 0.5%, last 6 versions, Firefox ESR, not dead
you end up with the following:
The text was updated successfully, but these errors were encountered: