Sass Reference - - By Hugo Giraudel

LibSass

Sass was born in late 2006 and has come a long way since then. For over 8 years, it has been maintained in Ruby, mostly by Natalie Weinzenbaum and Chris Eppstein.

Over the years, varied ports have appeared here and there. The most successful one is definitely LibSass, a port of Sass written in C/C++. It has long be lagging behind the original version of Sass, but is getting closer and closer each day to full compatibility.

In 2014, the Ruby Sass and LibSass teams decided to wait for both versions to reach feature parity before moving forward so that developers can actually choose the version they want based on the language without worrying about (un)supported features. The last remaining inconsistencies are listed under the Sass Compatibility project.

Using LibSass

LibSass cannot actually be used by itself. Indeed, it is nothing but a library. To actually run the code (i.e. compile your stylesheets), you need an implementer. There are a lot of implementers available, depending on the language you want to use.

Node-Sass is an implementer for Node, and is very popular due to the easy set up with Grunt or Gulp. Perl-LibSass is an implementer for Perl. SassC is an implementer written in C. There is even Ruby-LibSass which is an implementer in Ruby for LibSass (which at some point will be strict equivalent to the original Ruby Sass).

Testing LibSass

To test Sass code using LibSass as a compiler, you can use SassMeister which is an online playground to run Sass code. Just open the control panel and pick LibSass (which is always up to date with the latest version).