DEV Community

Cover image for Scan Duplicated & Similar CSS
Jiawei Li
Jiawei Li

Posted on

Scan Duplicated & Similar CSS

To auto detect redundant and unused CSS classes, I made this library recently: css-checker.

It helps to scan your codebase automatically by one command: 'css-checker'. I think it's always better to rely on automatic code checking tools than read all codes manually to find improvements.

The css-check can scan your CSS code along with your js/jsx/html/ts/tsx code to find unused CSS code (optional).


  • You can access to the package via go install:
go install
Enter fullscreen mode Exit fullscreen mode

(With go version before 1.17, use go get Or download from releases

  • Or from npm:
npm install -g css-checker-kit
Enter fullscreen mode Exit fullscreen mode

Start Checking

cd to your Project Path. Then just run:

Enter fullscreen mode Exit fullscreen mode

Image description

The css-checker helps in checking my projects in seconds, and provides hundreds of similar and redundant classes for me to improve.

You can check out the package from the Github link for more details: css-checker

Discussion (0)