Closed henryruhs closed 10 years ago
Yeap, API search prefixes only near by, because write prefixed and unprefixed version is common case.
I can change logic, but I make Autoprefixer much compilcated inside, it weill be bad for code climate. So, why you have this code and is this code style popular?
Okay, it should be in your documentation - first I wondered your script is not working.
Please think about "complete" removing all vendor prefixes with the "none" option or "another name", even those who are not near by their original declaration. Is this possible?
Please, open issue in and I will add note to docs: https://github.com/ai/autoprefixer
Or just send PR.
Everything is possible in IT, but for what cost? ;)
Some users write:
a {
-webkit-box-shadow: 0 0 -webkit-calc(1em + 1px) black;
box-shadow: 0 0 calc(1em + 1px) black;
-webkit-box-shadow: 0 0 1% black;
box-shadow: 0 0 1% black;
}
So one rule can contain different properies with one name. So i try to group it. In your CSS Autoprefixer will fint two groups of box-shadow
.
Some users need to write hacks for browsers:
a {
-moz-transform: translate3d(0, 0, 0)
}
Autoprefixer understand that group is hack if group doesn’t have unprefixed property. Of cource, Autoprefixer willn’t remove this hacks.
I understand this, but it does not help people with tons of CSS that has to be manually cleaned before using autoprefixer. Anyway thanks.
Of cource, I can extend logic but I will spend my weekend on this task and it will make Autoprefixer code much compilcated. So fixes will require some “payment”.
What we will get for this payment? Does this code style popular? Not, it is bad CSS style, of cource, prefixes must be near unprefixed version to good readability.
Does this outdated prefixers will broke your styles? Nope. This issue doesn’t have any side effects for interface.
So payment doesn’t give for us any value to justify payment.
grunt-autoprefixer
is just a Grunt wrap for autoprefixer
. Autoprefixer works in Gulp, Compass, Rails and many other systems.
I ask you to create issue in main repo, because this repo isn’t mine and I can forget about this issue.
Thanks, closing this issue now.
@ai consider a warning to stdout/stderr for such cases (with line numbers). It's better to let users know if something possibly went wrong.
Hello,
your autoprefixer does not work well with prefixes at the very top of a class, it does not detect / remove it at all:
Thanks for this script anyway...