I've recently (manually) removed a ton of unused CSS from a website, but it looks like I went a little over aggressive.
What is a good way to audit the html and javascript to determine which style definitions are missing from the CSS?
To clarify for @Paulie_D and others, I am looking for a way to find classes in the HTML and Javascript that ARE NOT in the CSS files.
In terms of debugging I use the _debug.scss file from Inuit.css to check for HTML oddities I may have missed.
https://github.com/csswizardry/inuit.css/blob/master/generic/_debug.scss
Includes things like finding empty elements, or <a>
tags with # as the href.
:empty{
outline:5px solid yellow;
}
It's probably a bit basic but based on the information you provided this might be your best solution, at least to start with.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With