vscode-css-navigation icon indicating copy to clipboard operation
vscode-css-navigation copied to clipboard

Identify Unused CSS Classes Across HTML, PHP, and JavaScript

Open KrisKomjati opened this issue 1 year ago • 1 comments

Would it be possible to extend the functionality to also list CSS classes that are not being used or referenced in the HTML, PHP, or JavaScript files? Currently, the extension shows where each CSS class from the stylesheet is used, but it would be helpful to see which classes are not utilized in these files as well in a click of a button. No modifications action is required from the button press, only an indication, so that we can investigate those "unused" css declarations.

Or if there is already a visual studio extension solution for that, can you reference one?

KrisKomjati avatar Aug 27 '23 13:08 KrisKomjati

As I know, there is no plugin to do so recently. Making the plugin to detect all the unused CSS codes is possible, but may be hard and not accurate enough.

But one tool of Chrome devtools can do so, at here: image

pucelle avatar Aug 28 '23 05:08 pucelle