UnCSS
How many times have you faced a situation where some classes/selectors are not used in HTML but are described in CSS code? This happens every time your project is changed or redesigned. For example, your task is to remove some section and add a few more lines in the HTML code. So you will add some CSS code and then remove some of it. But are you sure that the CSS code doesn't contain unused CSS portions of code? UnCSS will help you to finish this task. To install it, you need to execute this command:
npm install -g uncss
Let's take a look at the flags used in the npm
command:
Flag |
Description |
---|---|
|
Global installation |
|
Local installation These packages will appear in These packages are needed to run your app in production. |
|
Local installation These packages will appear in These packages are needed for development and testing processes. |
Integrating UnCSS in Gulp
First,...