Lombardi:
Find them unused CSS selectors.
Comments:
I’d never heard of it before! It’s gonna save me hours of time.
But with Rails you can cache all the CSS files into one at run time…
Cacheing helps, sure, but removing 40K of unused CSS helps even more….
It’s also a good idea to use YUI Compressor to minify the files and consolidate them as much as possible into just a few files.
It complicates matters that half the site is still using PHP the other half is using Rails, but have shared CSS files. So dealing with both legacy UI as well as new UI, and keeping everything straight is a real challenge.
Bill, this is also a useful technique, but for Javascript files in Rails.
Commenting is not available in this weblog entry.
We’re porting a legacy PHP app to Rails, and in the process giving a whole new UI design. We actually were hitting the hard limit in IE6 of 32 CSS files linked in the HEAD container, so consolidated it all into a few CSS files. The dust-me Firefox extension uncovered close to 2000 unused selectors and classes across 67 CSS files. Amazing tool.