Is there any online tool to find, remove and merge unused css selectors for given url. I need to optimize a web site that has many stylesheet files(more than 10) and i want to merge them in one file and remove all unused selectors.
Asked
Active
Viewed 1,273 times
3
-
possible duplicate of [How can I find unused images and CSS styles in a website?](http://stackoverflow.com/questions/33242/how-can-i-find-unused-images-and-css-styles-in-a-website) – kei Feb 10 '14 at 22:24
-
I'm looking for an online tool that automatically **find, remove, merge and minimize** css code – Darko Feb 10 '14 at 23:04
-
1Closing reason should be changed then: Questions asking us to **recommend or find a tool, library or favorite off-site resource** are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it. – kei Feb 10 '14 at 23:07
-
My problem is that I want to remove unused css selectors from large libraries such as bootstrap and this is merly imposible to do without some tool. And so far I haven;t found any tool that does this. – Darko Feb 10 '14 at 23:11
-
Also if someone has somekind of script for doing this will help me to do that... Thanx in advance.. – Darko Feb 10 '14 at 23:11
-
I don't know if such a tool exists, but if it does, it should be pretty sophisticated. Suppose you have a simple case like `.hide {display:none}` in your CSS and no `class="hide"` in your HTML. Then such a tool must make sure there's no Javascript anywhere that can add that class, pull in HTML through AJAX, attach the CSS file to a HTML file that does contain the class, etc. Not to mention more complex CSS like `div:not(.hide) span` which could be replaced by `div span` except that this changes the specificity, so this can cause other problems. – Mr Lister Feb 11 '14 at 08:32