travco / postcss-extend

A PostCSS plugin to minimize the number of repeat-selectors and rules you write
MIT License
114 stars 8 forks source link

cleaning up unused placeholder rules. #11

Closed jithine closed 8 years ago

jithine commented 8 years ago

This plugins removes a rule from generated css file only if the rule is used. Is there a way to strip off all placeholders? My generated css files has plenty of % placeholders lingering around.

travco commented 8 years ago

I'll look into it, I can certainly see why you wouldn't want them hanging around, and it should pull them out or at least that was the original plan (probably overlooked something).

Have you tried using a linter after using extend? To be frankly honest I don't know if it would clean them out as % is still prototype syntax, but since it doesn't refer to anything it might catch them

jithine commented 8 years ago

I have not tried using linters with postcss. Is there one which you recommend?

travco commented 8 years ago

I'd say stylelint for modularity (though there are others: https://github.com/postcss/postcss#linters)

That being said (now that I've gotten sleep and can think straight) the linter is almost guaranteed to not help with all the silent % placeholders, which I am currently working on fixing.

travco commented 8 years ago

Cleaning of placeholders to be fixed at the same time as #10