Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does anybody know of a CSS analysis tool? [closed]

Tags:

css

I'm looking for a tool that can analyze a large site and look for orphaned css.

I work on this project that has gone through a couple of UI updates. Scrapping the whole thing and redoing it all would take forever. What I would like is a tool that reads a css file and then lets you browse the site, keeping track of what definitions were used and how often.

Then I can go through the css file and find code that I did use and determine if it is indeed deprecated and can be deleted.

Thoughts?

like image 231
Rodrigo Avatar asked Sep 04 '09 15:09

Rodrigo


People also ask

How to audit CSS?

Another tool for auditing the performance CSS code is the Performance Monitor. To enable it, use CMD + Shift + P again, type “performance monitor,” and select the Show Performance Monitor option.

How do I check CSS errors?

A quick way to find errors in CSS code is to install the Web Developer tool bar add-on and use the validator through the tools drop down. What's cool about this tool is you can quickly validate local files too as it will automatically upload them to the W3C validator.

How can I tell which CSS file is using my current page?

Use http://getfirebug.com/ to debug the page. When looking at the css it will reference which stylesheet is used. For example: You can see from the screenshot that when using Firebug it shows in the blue text that the page is using the style.


1 Answers

Firefox has a great extension called Dust-Me Selectors for flagging up classes/ids that are not used on the current page.

There's also TopStyle, which promises to help you do the following (I've not used it, and can't vouch for it though):

  • Preview CSS while you write it.
  • Easily create pleasant color schemes for your site.
  • Style Checker validates your CSS syntax against multiple browsers.
  • Use Site Reports to see at-a-glance where CSS styles are used in your site.
  • Style Upgrade quickly replaces all outdated HTML code with equivalent CSS styling.
like image 105
Dominic Rodger Avatar answered Nov 15 '22 06:11

Dominic Rodger