A C/C++ implementation of a Sass compiler
glebm and xzyfer Catch exceptions by reference
Fixes `-Wcatch-value` warnings reported by gcc 8.2.0
Latest commit 4f9f662 Dec 15, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update ISSUE_TEMPLATE.md and fix links in CONTRIBUTING.md May 22, 2017
contrib Change C-API to pass compiler to custom functions Oct 22, 2015
docs Docs: Profiling Nov 14, 2018
include Re-implement selector unification Dec 5, 2018
m4 Reorganize source files into sub-directories Jul 19, 2015
res Update VS build facade Jan 29, 2017
script Run C++ unit tests on CI (Makefile-only) Nov 23, 2018
src Catch exceptions by reference Dec 17, 2018
test Run C++ unit tests on CI (Makefile-only) Nov 23, 2018
win Remove unused src/functions.{h,c}pp Dec 17, 2018
.editorconfig Fixing EditorConfig indent_style May 17, 2017
.gitattributes Add gitattributes for line ending normalization Jan 13, 2014
.gitignore Add /plugins/ to .gitignore Nov 21, 2018
.travis.yml Travis ASan: Use default Travis clang (v5.0) Nov 21, 2018
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Jun 26, 2018
COPYING Add autotools config Jun 14, 2012
GNUmakefile.am Use -std=c++11 Nov 19, 2018
INSTALL we dont follow those install rules Oct 4, 2014
LICENSE Changing copyright to Sass Open Source Foundation Feb 1, 2016
Makefile Use -std=c++11 Nov 19, 2018
Makefile.conf Remove unused src/functions.{h,c}pp Dec 17, 2018
Readme.md Update Readme.md May 15, 2018
SECURITY.md Let people know how to report security bugs Jun 9, 2015
appveyor.yml Disable FMA3 when compiling with VS2013 (#2308) Jan 30, 2017
configure.ac Fix automake build if sassc is missing Mar 18, 2018
extconf.rb Restructuring the library to work as a more Apr 22, 2012
version.sh Remove hard-coded version from autotools build Feb 24, 2015


LibSass - Sass compiler written in C++

Currently maintained by Marcel Greter (@mgreter) and Michael Mifsud (@xzyfer)
Originally created by Aaron Leung (@akhleung) and Hampton Catlin (@hcatlin)

Unix CI Windows CI Coverage Status Percentage of issues still open Average time to resolve an issue Bountysource Join us

LibSass is just a library! If you want to use LibSass to compile Sass, you need an implementer. Some implementations are only bindings into other programming languages. But most also ship with a command line interface (CLI) you can use directly. There is also SassC, which is the official lightweight CLI tool built by the same people as LibSass.

Excerpt of "sanctioned" implementations:

This list does not say anything about the quality of either the listed or not listed implementations!
The authors of the listed projects above are just known to work regularly together with LibSass developers.


LibSass is a C++ port of the original Ruby Sass CSS compiler with a C API. We coded LibSass with portability and efficiency in mind. You can expect LibSass to be a lot faster than Ruby Sass and on par or faster than the best alternative CSS compilers around.


As noted above, the LibSass repository does not contain any binaries or other way to execute LibSass. Therefore, you need an implementer to develop LibSass. Easiest is to start with the official SassC CLI wrapper. It is guaranteed to compile with the latest code in LibSass master, since it is also used in the CI process. There is no limitation here, as you may use any other LibSass implementer to test your LibSass branch!


Since LibSass is a pure library, tests are run through the Sass-Spec project using the SassC CLI wrapper. To run the 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. Note that the scripts in the ./script folder are mainly intended for our CI needs.


To build LibSass you need GCC 4.6+ or Clang/LLVM. If your OS is older, you may need to upgrade them first (or install clang as an alternative). 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 with various build chains and/or command line interpreters.

See the build docs for further instructions!


For all intents and purposes LibSass is fully compatible with the Sass language spec. Any known differences can be found as open issues.

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 conceived 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 http://sass-lang.com

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.