Closed scottadmi closed 6 years ago
Just pushed 0.12.3. Your expected result isn't something Crass can currently do. Crass tries to remove declarations in future rulesets that are overridden. Now it'll only try to remove them if they match !important
flags, which means that the original CSS will remain unchanged.
Crass currently seems to ignore !important in prioritization when optimizing css elements.
In the following source:
a { left: 0 !important; } div { color: red; } a { left: 1px; }
Crass produces:
div { color: red; } a { left: 1px; }
The expected result is:
div { color: red; } a { left: 0 !important; }
Interestingly if the div tag is removed from in between the two a tags, the result is correct.