Cleaning up css

For topics about current BETA or future releases, including feature requests.
Post Reply
User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 600
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Cleaning up css

Post by RSteinwand » Tue Jul 02, 2019 12:46 pm

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!
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3427
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Cleaning up css

Post by Albert Wiersch » Wed Jul 03, 2019 6:00 pm

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.
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 600
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Cleaning up css

Post by RSteinwand » Wed Jul 03, 2019 9:08 pm

Thanks Albert!
Rick

Post Reply