05 Oct 2014

CSS Byebye is a node module that lets you explicitly remove the CSS rules that you don't want.

Illustration of a CSS files with removed rules

It was developed in the context of a 3rd party javascript app that had its own CSS. The UI was made with Twitter Bootstrap and included normalize. Unfortunately, they added tons of unnecessary CSS rules.

For this particular project, it was easier to simply provide a list of unused selectors and remove them from the CSS.

It is available on npm and github.

CSS Byebye has also a Grunt plugin!

You can use it in your build process.

grunt-css-byebye on npm or grunt-css-byebye on github.