How can I identify unused CSS classes?

Our development team recently took on the challenge of refactoring our huge CSS file to make it more manageable in the future. I came up with a small list of subtasks, one of which is:

  • Remove styles that are not in use.

The problem is I don't know how to determine which styles are being used. Some styles do not appear anywhere, such as in third-party controls. Searching for a solution does not find these third party styles (for example, the default styles that come with Telerik controls). We seem to have overridden some of these third party styles.

Except for removing stuff and then checking each page to make sure it looks the same, I don't know what to do. Is there a solid method for determining when a CSS class is used?

+3


source to share


1 answer


In addition to other online services for local or private projects, you can find Helium.js .



0


source







All Articles