maximkoretskiy / postcss-initial

PostCSS plugin to fallback initial keyword
MIT License
187 stars 11 forks source link

Repeated processing causes duplicates #18

Closed ChaosExAnima closed 8 years ago

ChaosExAnima commented 8 years ago

Seeing an issue where the code causes duplicate properties if the fallback already exists.

Given this code:

selector {
    overflow: visible;
    overflow: initial;
    width: auto;
    width: initial;
}

Processing generates this:

selector {
    overflow: visible;
    overflow: visible;
    overflow: initial;
    width: auto;
    width: auto;
    width: initial;
}

This causes issues where the file is processed via a Grunt watch script or similar, as it can lead to hundreds of duplicate properties.