Page 1 of 1

Cleaning up css

Posted: Tue Jul 02, 2019 12:46 pm
by RSteinwand
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.


Re: Cleaning up css

Posted: Wed Jul 03, 2019 6:00 pm
by Albert Wiersch
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.

Re: Cleaning up css

Posted: Wed Jul 03, 2019 9:08 pm
by RSteinwand
Thanks Albert!