LibSass

LibSass is 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 behindDart Sass in features andCSS compatibility.LibSass is now deprecated—new projects should use Dart Sass instead.

WrappersWrappers permalink

LibSass is just a library. To run the code locally (i.e. to compile yourstylesheets), you need an implementer, or "wrapper". There are a number of otherwrappers for LibSass. We encourage you to write your own wrapper — the wholepoint 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 thereare multiple wrappers per language – in those cases, we put the mostrecently-updated wrapper first.

⚠️ Heads up!

Because LibSass is deprecated, most of these wrappers are end-of-life. Inorder to use them with the latest maintenance releases of LibSass, you mayneed to build them by hand.

  • 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 buildSassC, you must have either a local copy of the LibSass source or it must beinstalled 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 fortheCrystal programming language.

  • Go

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

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

  • Java

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

  • JavaScript

    Thesass.js project makes LibSassavailable as pure JavaScript. There’s a way totest it in thebrowser, too.

  • Lua

    The Lua wrapper is found atlua-sass.

  • .NET

    LibSass Host is updated regularly,and is probably the best bet. There’s alsolibsass-net orNSass, although they haven’t beenupdated in a while.

  • Node

    Thenode-sass project has proven to bepopular, and we’ve taken it into the main Sass GitHub repo. Check out itspackage pagehere, andthere’s adedicated twitter account for updates.

  • Perl

    TheCSS::Sass project is updatedregularly. There’s theText-Sass-XSproject, too, although it hasn’t been updated in a while.

  • PHP

    TheSassPHP project is an updatedfork of anolderPHP version.

  • Python

    Thelibsass-python project isupdated regularly. There are more details onits own website.

    Three other Python projects,python-scss,pylibsass andSassPython, haven’t beenupdated in a while.

  • Ruby

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

  • R

    TheRSasspackage wraps LibSass with additionalcaching and bundling methods.Extended documentation.

  • Rust

    Thesass_rs crate is a LibSasswrapper 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 is the brainchild ofHamptonLintorn-Catlin, the original creator of Sass.Aaron Leung is the primary developer.

LibSass logo