4

No dust-me-spider. No firebug.

I have made a project and I want to export only the CSS which has been used in the project or page. I have tried, dust-me-spider and firebug, but these add-ons grab all the CSS of the project! I need to grab only the CSS which has been used and export it to another CSS file. Does any program exist for such a reason?

John Stamoutsos
  • 191
  • 3
  • 16
  • Have a look at http://stackoverflow.com/questions/4867005/extracting-only-the-css-used-in-a-specific-page – RobF Jan 28 '14 at 10:31
  • Is not usefull for my question this answer. – John Stamoutsos Jan 28 '14 at 10:35
  • http://unused-css.com/ – Paulie_D Jan 28 '14 at 10:40
  • possible duplicate of [How can I export only the CSS used in a site? (Without: dust-me-spider, firebug)](http://stackoverflow.com/questions/21402270/how-can-i-export-only-the-css-used-in-a-site-without-dust-me-spider-firebug) – Paulie_D Jan 28 '14 at 10:53
  • Duplicate of another question by same OP: http://stackoverflow.com/questions/21402270/how-can-i-export-only-the-css-used-in-a-site-without-dust-me-spider-firebug – Paulie_D Jan 28 '14 at 10:53
  • Is it for a single page of for the entire site? Because you can get the content of a css file in javascript, then isolate each selector (easier to be said than done, I agree) and see if a query for that selector gets you any result in javascript. – Dan Ovidiu Boncut Sep 29 '15 at 12:37

1 Answers1

1

Its tricky because you can't know all of the javascript renderings on a page that would affect the css. I wrote my own plugin that i could run which would extract the visible css on the page and resort the css in order of cascading hierarchy. This is useful in that i can run it after any javascript action but it still requires investigation into the existing javascript. You are welcome to use it.http://stcreative.co.uk/tutorials/css_sorter/

Steve Tomlin
  • 3,391
  • 3
  • 31
  • 63