We want everyone to enjoy Sass, no matter what language they use. Sass was originally written in Ruby. LibSass is a C/C++ port of the Sass engine. The point is to be simple, faster, and easy to integrate. Find out more about the project over at GitHub.

Wrappers

LibSass is just a library. To run the code locally (i.e. to compile your stylesheets), you need an implementer, or "wrapper". There are a number of other wrappers for LibSass. We encourage you to write your own wrapper - the whole point of Libsass is that we want to bring Sass to many other languages, not just Ruby!

Below are the LibSass wrappers that we're currently aware of. Sometimes there are multiple wrappers per language – in those cases, we put the most recently-updated wrapper first.

  • Sass C

    SassC (get it?) is an wrapper written in C.

    To run the compiler on your local machine, you need to build SassC. To build SassC, you must have either a local copy of the LibSass source or it must be installed into your system. For development, please use the source version. You must then setup an environment variable pointing to the LibSass folder, for example:

    export SASS_LIBSASS_PATH=/Users/hcatlin/path/libsass
    

    The executable will be in the bin folder. To run it, simply try something like:

    ./bin/sassc [input file] > output.css
    
  • Go

    Wellington is an extension to LibSass that adds spriting and is available on brew:

    brew install wellington

    There are also three other LibSass wrappers in go: gosass, go-sass and go_sass which have not been updated in a while.

  • Java

    There is one Java wrapper – the LibSass Maven plugin.

  • JavaScript

    The only pure JavaScript implementation is sass.js. There's a way to test it in the browser, too.

  • Lua

    The lua wrapper is found at lua-sass.

  • .NET

    libsass-net is updated regularly, and is probably the best bet. There's also NSass, although it hasn't been updated in a while.

  • Node

    The node-sass project has proven to be popular, and we've taken it into the main Sass GitHub repo. Check out its package page here, and there's a dedicated twitter account for updates.

  • Perl

    The CSS::Sass project is updated regularly. There's the Text-Sass-XS project, too, although it hasn't been updated in a while.

  • PHP

    The SassPHP project is an updated fork of an older PHP version.

  • Python

    There are two python projects that are updated regularly. The libsass-python project (there are more details on its own website) and the python-scss project.

    Two other python projects, pylibsass and SassPython, haven't been updated in a while.

  • Ruby

    LibSass has also been ported back into ruby, for the sassc-ruby project.

  • Scala

    The only scala project, Sass-Scala, hasn't been updated in a couple of years.

About LibSass

This project is the brainchild of Hampton Catlin, the original creator of Sass, and is sponsored by Moovweb. Aaron Leung from Moovweb is the primary developer.

LibSass logo