Skip to content
A C/C++ implementation of a Sass compiler
C++ C Shell Other
Latest commit 5069143 @xzyfer xzyfer Merge pull request #1909 from xzyfer/fix/issue-1904
Fix word_boundary check to account for #
Failed to load latest commit information.
contrib Change C-API to pass compiler to custom functions
docs Improve SunOS Makefile specifics and add documentation
include Remove `To_String` by using `AST->to_string` and `inspect`
m4 Reorganize source files into sub-directories
res Fix build for mingw and dll linking
script Fix code coverage error
src Merge pull request #1909 from xzyfer/fix/issue-1904
test Remove `To_String` by using `AST->to_string` and `inspect`
win Remove `To_String` by using `AST->to_string` and `inspect`
.editorconfig Update .editorconfig
.gitattributes Add gitattributes for line ending normalization
.gitignore repo: Add exit code for explicit test.
.travis.yml Use Travis-CI container-based infrastructure
COPYING Add autotools config Use not to conflict with static Makefile
INSTALL we dont follow those install rules
LICENSE Changing copyright to Sass Open Source Foundation
Makefile Add logic clean up in Makefile
Makefile.conf Remove `To_String` by using `AST->to_string` and `inspect` Removing Contributor Agreement and adding in Moovweb note. Let people know how to report security bugs
appveyor.yml Switch back to Visual Studio 2013 Reorganize headers into `sass` subfolder
extconf.rb Restructuring the library to work as a more Remove hard-coded version from autotools build


by Aaron Leung (@akhleung), Hampton Catlin (@hcatlin), Marcel Greter (@mgreter) and Michael Mifsud (@xzyfer)

Linux CI Windows CI Bountysource Coverage Status Join us

LibSass is just a library, but if you want to RUN LibSass, then go to or or find your local implementer.

LibSass requires GCC 4.6+ or Clang/LLVM. If your OS is older, this version may not compile.

On Windows, you need MinGW with GCC 4.6+ or VS 2013 Update 4+. It is also possible to build LibSass with Clang/LLVM on Windows.


LibSass is a C/C++ port of the Sass CSS precompiler. The original version was written in Ruby, but this version is meant for efficiency and portability.

This library strives to be light, simple, and easy to build and integrate with a variety of platforms and languages.


As you may have noticed, the LibSass repo itself has no executables and no tests. Oh noes! How can you develop???

Well, luckily, SassC is the official binary wrapper for LibSass and is always kept in sync. SassC uses a git submodule to include LibSass. When developing LibSass, its best to actually check out SassC and develop in that directory with the SassC spec and tests there.

We even run Travis tests for SassC!


Since LibSass is a pure library, tests are run through the SassSpec project using the SassC driver.

To run tests against LibSass while developing, you can run ./script/spec. This will clone SassC and Sass-Spec under the project folder and then run the Sass-Spec test suite. You may want to update the clones to ensure you have the latest version.

Library Usage

While LibSass is a library primarily written in C++, it provides a simple C interface which should be used by most implementers. LibSass does not do much on its own without an implementer. This can be a command line tool, like sassc or a binding to your favorite programing language.

If you want to build or interface with LibSass, we recommend to check out the documentation pages about building LibSass and the C-API documentation.

About Sass

Sass is a CSS pre-processor language to add on exciting, new, awesome features to CSS. Sass was the first language of its kind and by far the most mature and up to date codebase.

Sass was originally concieved of by the co-creator of this library, Hampton Catlin (@hcatlin). Most of the language has been the result of years of work by Natalie Weizenbaum (@nex3) and Chris Eppstein (@chriseppstein).

For more information about Sass itself, please visit

Initial development of libsass by Aaron Leung and Hampton Catlin was supported by Moovweb.


Our MIT license is designed to be as simple, and liberal as possible.

sass2scss was originally written by Marcel Greter and he happily agreed to have it merged into the project.

Something went wrong with that request. Please try again.