How to install Sass and Compass in Ubuntu

What is Sass and Compass ?

Sass is a css pre-processor that helps you write more intelligent and efficient code. It comes in two syntaxes, .scss and .sass formats of the two .scss seems more popular; it’s essentially the same syntax as css but with extra functionality that sass provides. .sass is similar to ruby, it is white-space sensitive and strips out the semi colons and curly brackets that you see in css.So here below steps will help you to install Sass and Compass in Ubuntu.

Compass describes it self as a css authoring framework, think of it as sass snippets or a library for sass. Whilst you don’t need compass to use sass it’s make life so much easer.

To install both Sass and Compass in Ubuntu or Debian you will first need to install ruby and ruby gems packages.

apt-get install ruby-full

Sass and Compass get installed as Ruby gems so you’ll need to have Ruby on your machine.

Now you can download and install sass and compass with the following commands. (Gem is a package management system for ruby apps think of it as apt-get for ruby)

gem install sass

install-sass

gem install compass

isntall-compass

Create & Watch a test project

To create a test project with compass run the following command.

compass create sass-test

create-compass-test-project

To watch project for changes and compile the sass into css run the following command.

# Cd to you'r project
cd /path/to/sass-test
compass watch
compass clean

compass-clean-watch

Run the following command for more help with compass

compass
compass help <command>

 You may also like to look into these sass libraries.

gem install zen-grids
gem install sassy-buttons
gem install bootstrap-sass

 

Balvinder Singh

Hello, I am Balvinder Singh - DevOps Engineer with 2.5+ year of working experience with different server environments. Tag Line:-Linux | AWS| WHM |Monitoring | Virtualization | Optimization | Performance | Security | Release & Deployment. I love helping companies / clients to deploy their code / applicateions to well managed, optimized, secure server and can go extra mile to satisfy.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *