CSS Sanitation

Published:

Last updated:

Estimated reading time: 1 minute

I do a lot of back-end web development but front-end calls me a lot because of my passion for creativity. I’ve had to consider CSS files on various projects I’ve worked on. Some as front-end designer, some as back-end.

On a project I’m working on, we’ve had various hands in the stylesheets and it has caused a lot of irrelevant rules in the CSS. Some global classes are not really been put to use and the CSS already contains over 6,500 lines of code already. Also, the fact that multiple frameworks are used on the present project, it lands us in a larger number of selectors.

To clean up my unused rules I have picked on the following:

Uncss is really easy to install with npm. You should see this video on how to automate CSS cleanup with uncss https://www.youtube.com/watch?v=833xr1MyE30

cssnodejsweb

Newer post

Oh Sass! How awesome is it gonna get

Older post

Butterfly and Fish

Responses

You may respond to this post by referencing it on your blog, twitter, or any website