Steven 2 minute read
March 15, 2014

Neat Compass Tool

I’ve been using Sass on all new projects for the last few years now - I can’t ever envisage a scenario where I’d go back to vanilla CSS. Even coming into a legacy project where stylesheets are littered all over the place makes me feel icky and inefficient.

I always try to keep my styles as light as reasonably possible — breaking pretty much everything everything into a Sass partial (you should definitely be doing this if you’re working in a large project team) and running media queries and Internet Explorer rules right inside of the selector itself.

Cool Compass

Alongside Sass, I usually make use of the Compass framework as well. One thing I’ve found very useful, particularly on projects with several Sass partials is the compass stats command.

What this will do is look at your Sass partials and give a report on their rules, properties, mixins, filesize and more. Here’s a sample of the output:

I can see at a glance where I may need to look at refactoring my styles. What I have seen though is that it always tends to be third-party CSS that is the most bloated (styles for jQuery plugins mainly) — so you should look to refactor these if you can, many of them still don’t use Sass.