When your project grows or when you are using CSS frameworks, such as Bootstrap, your compiled CSS code can contain many selectors that are never used. This unused CSS code will have a negative effect on the performance of your website. The unused CSS plugin can remove this unused selector from your CSS code.
The only requirement for this recipe is to have the unused CSS plugin installed and loaded in your Gruntfile.js
file. If you have not installed this plugin in the Installing Grunt plugins recipe of this chapter, you can do so using the following command in the root of your project:
$ npm install grunt-uncss –save-dev