autoprefixer icon indicating copy to clipboard operation
autoprefixer copied to clipboard

[Bug] Using "last X versions or not dead", nearly not more prefixing.

Open Yivan opened this issue 5 years ago • 3 comments

Hello,

I spend long time on this, but i arrive to the conclusion that there is a bug when "or not dead" condition used (settings option or .rc file same).

Bug: Adding "or not dead" doesn't prefix the file as intended.

To reproduce: Run a first time with just "last 10 versions": you will get a well prefixed files with many prefix. Run a second time with "last 10 versions or not dead": you get no more prefixers (or very few), and file size is a lot lighter so. It should not as it is a "or" condition.

What is strange is that the list of browsers detected is right... so it is like there is something special during prefixing for this condition in the prefixing code itself... if it can help to fix the bug, maybe there is something here.

This bugs doesn't happen with condition like "or not ie <= 10", in this case it works fine.

I hope it could be fixed, because if some devolpers and a condition like this, they break all the prefixing...

Thanks!

Yivan avatar Apr 19 '20 17:04 Yivan

Please send PR to https://github.com/browserslist/browserslist

I am closing issue because this issue is not relevant to the Autoprefixer code. You can open an issue in Browserslist repo.

ai avatar Apr 19 '20 17:04 ai

@ai Ho yes you are totally right. Really sorry of this mistake !

Yivan avatar Apr 19 '20 22:04 Yivan

You can do "or" in Browserslist?

A config like this:

last 10 version
not dead

Equates to last 10 version and not dead.

That's not a bug, that's a feature.

I'm just checking that you aren't confused about how Browserslist works.

Dan503 avatar Apr 20 '20 01:04 Dan503