How to find not used css classes?

Is there a website on WordPress. Need in style.css find and remove not used classes.
Please tell me, maybe there is some online service? Or maybe you can through the browser to find?
April 4th 20 at 13:20
3 answers
April 4th 20 at 13:22
Article is for Chrome DevTools. However, if the test found no element with a class that actually is used will be marked as unused.
How to use Chrome DevTools, I do not quite understand. So I went to Covarage. And how can you not see the CSS classes used on the site?
5e283637f4146139057112.png - josiah_Hayes commented on April 4th 20 at 13:25
@josiah_Hayes, but in the list there are some CSS files, choose any, and red will be allocated to unused classes (which was not seen during the Coverage test). - vergie_Paucek commented on April 4th 20 at 13:28
@josiah_Hayes, I want to add you manually to do it. - dina commented on April 4th 20 at 13:31
It is better not to do it either manually or automatically. Such tests miss the classes used for processing error messages, for example - until you see this message. Extreme savings, leading to poorly predictable problems. - eriberto.Walter commented on April 4th 20 at 13:34
April 4th 20 at 13:24
Break code into components and then Assembly. As the whole world gathers frontend

At the moment when you're spaghetti css unpacking section you will find unused styles.
But it's in the trio: css, html, js - the only way you will find for all.

Another option - I see that the css tainted (no prefix, no BEM, etc.), then spend the name for the entire project. In the code, layout in js it will find all occurrences. If you can't find - feel free to delete it. But - provided that you know how the project works. And that will screw up if there is a dependence on something third-party is.

css should be clean. It must be divided into modules files. And then chaos will not. And to combine all the files in the same webparam
css tainted (no prefix, no BEM, etc.)

lol... - ida75 commented on April 4th 20 at 13:27
Do you really think when people ask this question, he will understand what you said? - Rahul.OKeefe commented on April 4th 20 at 13:30
@Rahul.OKeefe, it is worth remembering that the questions/answers here - knowledge base.
Does not help him help another user that will come with the same question later. - Durward.Friesen commented on April 4th 20 at 13:33
April 4th 20 at 13:26

Find more questions by tags CSSWeb Development