nDmitry / grunt-autoprefixer

Parse CSS and add vendor-prefixed CSS properties using the Can I Use database. Based on Autoprefixer.
MIT License
795 stars 60 forks source link

Postprocessing not working #64

Closed raphaelokon closed 10 years ago

raphaelokon commented 10 years ago

The autoprefixr doesn't remove unnecessary properties from the CSS like it is stated in the original autoprefixr == > https://github.com/postcss/autoprefixer#only-actual-prefixes

Edit: It seems to work on normal files, but not on large .css files that has been compiled from .less

Edit #2: So this doesn't work when you have the following order of properties:

This doesn't work:

div
{
    border-radius:0 5px 5px 0;
    -webkit-border-radius:0 5px 5px 0;
    -moz-border-radius:0 5px 5px 0;
}

This works …

div
{
    -webkit-border-radius:0 5px 5px 0;
    -moz-border-radius:0 5px 5px 0;
    border-radius:0 5px 5px 0;
}

and outputs for browsers last version

div
{
    border-radius:0 5px 5px 0;
}
Rowno commented 10 years ago

This is by design, see https://github.com/postcss/autoprefixer#disabling

raphaelokon commented 10 years ago

ouch! thanks man!