Install SASS and Compass on Ubuntu

Emmanuel Gautier / October 19, 2014

2 min read

SASS is a CSS preprocess used by many web projects including Foundation and Bootstrap. It allows generating a CSS style sheet from a language close to CSS syntax.

Why use a CSS preprocessor?

The advantage of using a preprocessor is that these preprocessors are programming languages instead of CSS syntax. This allows structuring your design in files, grouping some style characteristics such as colors, dimensions of blocks in variables, … etc. To summarize using a preprocessor as SASS allows you to organize and maintain simpler the design of your web applications.

Compass is a SASS framework. This framework introduces a set of functions and structures to help you build the design.

SASS and Compass Installation

We will now install SASS and Compass allowing CSS files compilation. Those tools will be used as CLI tools.

First of all, if it is not already the case, you will need to install Ruby:

sudo apt-get install make ruby ruby-dev

From the gem packages manager, we can install the tools:

sudo gem install sass compass

If you want to have the latest versions, you can replace the last command with the following one:

gem install sass compass --pre