Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A C/C++ implementation of a Sass compiler
C++ C Shell Other

Merge pull request #1247 from xzyfer/fix/string-comparisions

Fix comparision of double quoted strings
latest commit 367266118d
@xzyfer xzyfer authored
Failed to load latest commit information.
b64 Code: Fixes VC warnings.
contrib Refactor custom function/importer signatures
m4 Use autoreconf -i and add gitkeep to m4 to make automake happy
posix Add project files for Visual Studio Community 2013
res Fix build for mingw and dll linking
script Add minor improvements in Makefile
support Switch to the new organization URLs.
test JMA - Moved node tests into test folder. Deleted extraneous Libsass T…
utf8 Replaces native utf8 handling with UTF8-CPP library
win Code: Fixes dynamic exception as per C++11 specs.
.editorconfig Fix EditorConfig Makefile selector
.gitattributes Add gitattributes for line ending normalization
.gitignore add sass_version to copied headers
.travis.yml Add minor improvements in Makefile
COPYING Add autotools config
INSTALL we dont follow those install rules
LICENSE Move read me and license out of the source
Makefile Add minor improvements in Makefile add sass_version to copied headers Use a better slack URL
appveyor.yml CI: Removes MinGW from cache.
ast.cpp Clean up white-space in code
ast.hpp Implement `is_superselector` sass function
ast_def_macros.hpp Refactor header include guards
ast_factory.hpp Implement using & in SassScript
ast_fwd_decl.hpp Implement using & in SassScript
backtrace.hpp Backtrace lines are off-by-one
base64vlq.cpp Revert "Merge pull request #236 from nschonni/move-to-src"
base64vlq.hpp Refactor header include guards
bind.cpp Improve keyword handling in arglists
bind.hpp Code: Fixes VC warnings.
cencode.c [BUGFIX] Add fix for source-maps (Fix-Up PR #591)
color_names.hpp Refactor header include guards Simplify autotools build
constants.cpp Add a max stack depth setting
constants.hpp Add a max stack depth setting
context.cpp Implement `is_superselector` sass function
context.hpp Implement custom headers (experimental)
contextualize.cpp Fix parent selector interpolation in attribute selector
contextualize.hpp Implement using & in SassScript
contextualize_eval.cpp Fix parent selector interpolation in attribute selector
contextualize_eval.hpp Implement using & in SassScript
cssize.cpp Don't output nested media queries that cannot be merged
cssize.hpp Implement all output styles
debug.hpp Refactor header include guards
debugger.hpp Fix debug_ast crashing with some Strings
emitter.cpp Merge pull request #1181 from mgreter/bugfix/issue_1092
emitter.hpp Fixes an edge case with compact `@font-face` output
environment.hpp Improve scope handling for variables
error_handling.cpp Relax compact error to warning
error_handling.hpp Relax compact error to warning
eval.cpp Fix comparision of double quoted strings
eval.hpp Implement using & in SassScript
expand.cpp Fix more issues with parent selector interpolation
expand.hpp Implement using & in SassScript
extconf.rb Restructuring the library to work as a more
extend.cpp Fix `@extend` specificity problems
extend.hpp Code: Fixes VC warnings.
file.cpp Add support for multiple importers
file.hpp Refactor file resolving and internal API
functions.cpp Fix colour rounding to match 3.4.14
functions.hpp Implement `is_superselector` sass function
inspect.cpp Improve url parsing (support line-feeds in strings)
inspect.hpp Implement using & in SassScript
json.cpp Use uint32_t instead of uchar_t to avoid conflicts on SmartOS
json.hpp Adds json library by Joseph A. Adams
kwd_arg_macros.hpp Refactor header include guards
lexer.cpp Remove ignored `const` qualifiers (compiler warnings)
lexer.hpp Remove ignored `const` qualifiers (compiler warnings)
listize.cpp Handle only the required nodes in Listize
listize.hpp Handle only the required nodes in Listize
mapping.hpp Refactor header include guards
memory_manager.hpp Refactor header include guards
node.cpp Fix DEBUG compile mode
node.hpp Fix DEBUG compile mode
operation.hpp Implement using & in SassScript
output.cpp Improve selectors parsing for nth-child binomials
output.hpp Fix order of top nodes (comments and imports)
parser.cpp Fix parsing of optional ; in top level directives
parser.hpp Don't eval static division ops inside interpolants
paths.hpp Refactor header include guards
plugins.cpp Implement custom headers (experimental)
plugins.hpp Implement custom headers (experimental)
position.cpp Improve `block_comment` parsing
position.hpp IE property hacks should be parsed as static values
prelexer.cpp Merge pull request #1198 from mgreter/bugfix/issue_442
prelexer.hpp Fix interpolation edge case in value parsing
remove_placeholders.cpp Implement improved source-mapping
remove_placeholders.hpp Code: Fixes VC warnings.
sass.cpp Refactor file resolving and internal API
sass.h Refactor file resolving and internal API
sass2scss.cpp Add @charset support to sass2scss
sass2scss.h Refactor header include guards
sass_context.cpp Fix bug in C-API with context compiler status
sass_context.h Add `sass_context_get_included_files_size` to API
sass_functions.cpp Refactor custom function/importer signatures
sass_functions.h Implement custom headers (experimental)
sass_interface.cpp Clean up some code from previous refactoring
sass_interface.h Refactor custom function/importer signatures
sass_util.cpp Prepare for output refactoring
sass_util.hpp Refactor header include guards
sass_values.cpp Remove ignored `const` qualifiers (compiler warnings)
sass_values.h Remove ignored `const` qualifiers (compiler warnings)
sass_version.h Simplify autotools build Simplify autotools build
source_map.cpp Add source pointer to ParserState
source_map.hpp Improve sourcemap output for prepended texts
subset_map.hpp Fix illegal extending when no blocks are found
to_c.cpp Refactor C Interface to hide implementation details
to_c.hpp Refactor header include guards
to_string.cpp Fix a few list output edge cases
to_string.hpp Fix a few list output edge cases
units.cpp Refactor unit handling to enable unit groups
units.hpp Refactor unit handling to enable unit groups
utf8.h Replaces native utf8 handling with UTF8-CPP library
utf8_string.cpp Refactor header include guards
utf8_string.hpp Implement third party plugins loader
util.cpp Improve url parsing (support line-feeds in strings)
util.hpp Improve url parsing (support line-feeds in strings) Remove hard-coded version from autotools build


by Aaron Leung (@akhleung) and Hampton Catlin (@hcatlin)

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 wiki 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 created by the co-creator of this library, Hampton Catlin (@hcatlin). The extension and continuing evolution of the language has all been the result of years of work by Natalie Weizenbaum (@nex3) and Chris Eppstein (@chriseppstein).

For more information about Sass itself, please visit

Contribution Agreement

Any contribution to the project are seen as copyright assigned to Hampton Catlin, a human on the planet earth. Your contribution warrants that you have the right to assign copyright on your work. The intention here is to ensure that the project remains totally free (liberal, like).

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.