Hi Albert,
When validating a page, you're already reporting any classes or id's that aren't being used for in-line styles. Could we expand that for the batch wizard and compare to external stylesheets?
When crawling the site, if you were to record the classes and id's found on the page, and when done, compare those to the stylesheet, then you'd have a fair indication of what classes and id's were not used and could be reviewed for removal. Obviously this would be just where that class or id was referenced. It would be up to the user to comment out any affected code or know what code might be used for scripts.
I mention this since I'm working on a site refresh with ~500 pages and there'll be a lot of changes and I'd like to clean up my css at some point. I suspect there's already a bunch of unused css there from before it landed in my lap. I'm confident I have unused css for all my other sites as well.
Thanks!
Cleaning up css
-
- Rank VI - Professional
- Posts: 596
- Joined: Mon Jun 09, 2008 2:12 pm
- Location: Fargo, ND
Cleaning up css
Rick
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
Re: Cleaning up css
Hi Rick,
Thanks for the suggestion. It's certainly a good one but implementation could be time-consuming even though in concept it doesn't seem that complex (the "devil is in the details"). I'll put it on my request list and will have to think in detail about how it might be implemented for a future major release.
Thanks for the suggestion. It's certainly a good one but implementation could be time-consuming even though in concept it doesn't seem that complex (the "devil is in the details"). I'll put it on my request list and will have to think in detail about how it might be implemented for a future major release.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
-
- Rank VI - Professional
- Posts: 596
- Joined: Mon Jun 09, 2008 2:12 pm
- Location: Fargo, ND