User login

Agaric wants to parse our CSS files for declarations unused by our sites

Ask the internet and ye shall receive:

http://www.sitepoint.com/blogs/2007/07/30/find-unused-css-selectors-with-dust-me-selectors/
http://www.sitepoint.com/dustmeselectors/

As with any automated tool, use your human intelligence and discretion if you can find where you put it.

This goes double with a content management system like Drupal, and triple when you're using JQuery to add and remove classes and IDs.

There's simply no way on a dynamic web site, that can treat anonymous users and users with different roles in varying ways, where JQuery can change the CSS selectors called based on clicks and PHP can change it on context, for a spidering script to catch all of the CSS that's actually used.

But this special CSS, we hope, has made more of an imprint on your mind when you put it in and you won't delete it just because some CSS and HTML DOM spidering script tells you to.

Resolution

Searched words: 
css remove if not used find obsolete historical vestige cascading stylesheet statements

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.