LibSass

LibSass was an implementation of Sass in C/C++, designed to be easy to integrate into many different languages. However, as time wore on it ended up lagging behind Dart Sass in features and CSS compatibility. It reached its end of life in October 2025. any legacy projects still using LibSass or its wrapper libraries like Node Sass should migrate to Dart Sass.

Migrating AwayMigrating Away permalink

LibSass stopped receiving feature updates before Dart Sass even launched, and it had a number of known incompatibilities with the Sass specification. Since then, Sass has grown and evolved to support the latest CSS features, so projects still using LibSass will unfortunately have some serious catching up to do.

The following are the biggest known differences:

  • LibSass only supports @import for loading files. Although Dart Sass versions through the 2.x will continue to support @import, it’s deprecated in recent versions, and we recommend all code move to @use instead. The Sass migrator can automatically migrate projects from @import to @use. See /d/import for details.

  • LibSass uses / for division. Dart Sass 1.x does as well, but Dart Sass 2.x will use it as a list separator, so using it for division is deprecated. The Sass migrator can automatically migrate projects from / to the new math.div() function. See /d/slash-div for details.

  • LibSass parses custom properties like any other CSS property. Dart Sass parses them the same way it parses at-rules, as plain CSS except where SassScript is injected using interpolation. See /d/css-vars for details.

  • LibSass supports @extend rules with complex selector targets, like @extend .foo.bar, using semantics that don’t match the way @extend is defined to work. These are not supported in Dart Sass. See /d/extend-compound for details.

WrappersWrappers permalink

LibSass was just a library. To run the code locally (i.e. to compile your stylesheets), you also needed a wrapper. Below are the LibSass wrappers that we’re aware of having excited. Sometimes there are multiple wrappers per language—in those cases, we put the most recently-updated wrapper first.

⚠️ Heads up!

Like LibSass, these wrappers are end-of-life. They may not have compiled versions that are up-to-date with the most recent LibSass release from its sundown window.

  • Sass C

    SassC (get it?) is a 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/hampton/path/libsass
    

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

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

    sass.cr is a LibSass wrapper for the Crystal programming language.

  • Go

    go-libsass has the most active GoLang wrapper. gosass is another LibSass wrapper.

    C6 is a Sass 3.2 compatible implementation written in pure GoLang that aims to extend Sass. wellington/sass is an in-progress pure Go Sass lexer, parser, and compiler.

  • Java

    There is one Java wrapper — jsass. There is also a plugin for Maven — LibSass Maven plugin.

  • JavaScript

    The sass.js project makes LibSass available as pure JavaScript. There’s a way to test it in the browser, too.

  • Lua

    The Lua wrapper is found at lua-sass.

  • .NET

    LibSass Host is updated regularly, and is probably the best bet. There’s also libsass-net or NSass, although they haven’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

    The libsass-python project is updated regularly. There are more details on its own website.

    Three other Python projects, python-scss, pylibsass and SassPython, haven’t been updated in a while.

  • Ruby

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

  • R

    The R Sass package wraps LibSass with additional caching and bundling methods. Extended documentation.

  • Rust

    The sass_rs crate is a LibSass wrapper and is updated regularly.

  • Scala

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

About LibSassAbout LibSass permalink

This project was the brainchild of Hampton Lintorn-Catlin, the original creator of Sass. Aaron Leung was the initial primary developer, and Michael Mifsud and Marcel Greter were the primary developers for its latter years.

LibSass logo