2014-07-11 04:28:14 +02:00
|
|
|
|
---
|
2016-02-27 13:58:18 +01:00
|
|
|
|
title: LibSass
|
2014-07-11 04:28:14 +02:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
%p.introduction
|
2015-04-02 01:51:37 +02:00
|
|
|
|
We want everyone to enjoy Sass, no matter what language they use. Sass was
|
2016-09-17 12:12:21 +02:00
|
|
|
|
originally written in Ruby. LibSass is a C/C++ port of the Sass engine. The
|
|
|
|
|
point is to be simple, faster, and easy to integrate. Find out more about the
|
|
|
|
|
project over at
|
2014-07-11 04:28:14 +02:00
|
|
|
|
= succeed "." do
|
2016-09-17 12:12:21 +02:00
|
|
|
|
= link_to "GitHub", "http://github.com/sass/libsass"
|
2014-07-11 04:28:14 +02:00
|
|
|
|
|
|
|
|
|
:markdown
|
2014-10-04 00:17:39 +02:00
|
|
|
|
## Wrappers
|
2014-07-11 04:28:14 +02:00
|
|
|
|
|
2016-09-17 12:11:34 +02:00
|
|
|
|
LibSass is just a library. To run the code locally (i.e. to compile your
|
|
|
|
|
stylesheets), you need an implementer, or "wrapper". There are a number of
|
|
|
|
|
other wrappers for LibSass. We encourage you to write your own wrapper - the
|
|
|
|
|
whole point of Libsass is that we want to bring Sass to many other languages,
|
|
|
|
|
not just Ruby!
|
2014-07-11 04:28:14 +02:00
|
|
|
|
|
2016-09-17 12:11:34 +02:00
|
|
|
|
Below are the LibSass wrappers that we're currently aware of. Sometimes there
|
|
|
|
|
are multiple wrappers per language – in those cases, we put the most
|
|
|
|
|
recently-updated wrapper first.
|
2014-07-11 04:28:14 +02:00
|
|
|
|
|
2014-10-04 00:17:39 +02:00
|
|
|
|
%ul.slides
|
|
|
|
|
%li#sassc
|
|
|
|
|
:markdown
|
2015-06-06 00:11:10 +02:00
|
|
|
|
### Sass C
|
|
|
|
|
|
2016-09-17 12:11:34 +02:00
|
|
|
|
[SassC](https://github.com/sass/sassc) (get it?) is an wrapper written in
|
|
|
|
|
C.
|
2014-07-11 04:28:14 +02:00
|
|
|
|
|
2016-09-17 12:11:34 +02:00
|
|
|
|
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:
|
2014-07-11 04:28:14 +02:00
|
|
|
|
|
2014-10-04 00:17:39 +02:00
|
|
|
|
~ partial "code-snippets/libsass-setup"
|
|
|
|
|
|
|
|
|
|
%p
|
2016-09-17 12:11:34 +02:00
|
|
|
|
The executable will be in the bin folder. To run it, simply try something
|
|
|
|
|
like:
|
2014-10-04 00:17:39 +02:00
|
|
|
|
|
|
|
|
|
~ partial "code-snippets/libsass-execute"
|
|
|
|
|
|
|
|
|
|
%li#go
|
|
|
|
|
:markdown
|
|
|
|
|
### Go
|
2016-09-17 12:11:34 +02:00
|
|
|
|
[Wellington](https://github.com/wellington/wellington) is an extension to
|
|
|
|
|
LibSass that adds spriting and is available on brew:
|
2015-06-06 00:11:10 +02:00
|
|
|
|
|
|
|
|
|
`brew install wellington`
|
|
|
|
|
|
2016-09-17 12:11:34 +02:00
|
|
|
|
There are also three other LibSass wrappers in go:
|
|
|
|
|
[gosass](https://github.com/moovweb/gosass),
|
|
|
|
|
[go-sass](https://github.com/SamWhited/go-sass) and
|
|
|
|
|
[go_sass](https://github.com/suapapa/go_sass) which have not been updated
|
|
|
|
|
in a while.
|
2014-10-04 00:17:39 +02:00
|
|
|
|
|
|
|
|
|
%li#java
|
|
|
|
|
:markdown
|
|
|
|
|
### Java
|
2017-03-29 02:39:02 +02:00
|
|
|
|
There is one Java wrapper – [jsass](https://github.com/bit3/jsass).
|
|
|
|
|
There is also a plugin for Maven -
|
2016-09-17 12:11:34 +02:00
|
|
|
|
[LibSass Maven plugin](https://github.com/warmuuh/libsass-maven-plugin).
|
2014-10-04 00:17:39 +02:00
|
|
|
|
|
|
|
|
|
%li#javascript
|
|
|
|
|
:markdown
|
|
|
|
|
### JavaScript
|
2015-12-07 01:28:03 +01:00
|
|
|
|
The only pure JavaScript implementation is
|
|
|
|
|
[sass.js](https://github.com/medialize/sass.js). There's a way to
|
|
|
|
|
[test it in the browser](http://medialize.github.io/playground.sass.js/),
|
|
|
|
|
too.
|
2014-10-04 00:17:39 +02:00
|
|
|
|
|
|
|
|
|
%li#lua
|
|
|
|
|
:markdown
|
|
|
|
|
### Lua
|
2016-09-17 12:11:34 +02:00
|
|
|
|
The lua wrapper is found at
|
|
|
|
|
[lua-sass](https://github.com/craigbarnes/lua-sass).
|
2014-10-04 00:17:39 +02:00
|
|
|
|
|
|
|
|
|
%li#net
|
|
|
|
|
:markdown
|
|
|
|
|
### .NET
|
2016-09-17 12:11:34 +02:00
|
|
|
|
[libsass-net](https://github.com/darrenkopp/libsass-net) is updated
|
|
|
|
|
regularly, and is probably the best bet. There's also
|
|
|
|
|
[NSass](https://github.com/TBAPI-0KA/NSass), although it hasn't been
|
|
|
|
|
updated in a while.
|
2014-10-04 00:17:39 +02:00
|
|
|
|
|
|
|
|
|
%li#node
|
|
|
|
|
:markdown
|
|
|
|
|
### Node
|
2016-09-17 12:11:34 +02:00
|
|
|
|
The [node-sass](https://github.com/sass/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](https://www.npmjs.org/package/node-sass), and
|
|
|
|
|
[there's a dedicated twitter account](https://twitter.com/nodesass) for
|
|
|
|
|
updates.
|
2014-10-04 00:17:39 +02:00
|
|
|
|
|
|
|
|
|
%li#perl
|
|
|
|
|
:markdown
|
|
|
|
|
### Perl
|
2016-09-17 12:11:34 +02:00
|
|
|
|
The [CSS::Sass](https://github.com/sass/perl-libsass) project is updated
|
|
|
|
|
regularly. There's the
|
|
|
|
|
[Text-Sass-XS](https://github.com/ysasaki/Text-Sass-XS) project, too,
|
|
|
|
|
although it hasn't been updated in a while.
|
2014-10-04 00:17:39 +02:00
|
|
|
|
|
|
|
|
|
%li#php
|
|
|
|
|
:markdown
|
|
|
|
|
### PHP
|
2016-09-17 12:11:34 +02:00
|
|
|
|
The [SassPHP](https://github.com/sensational/sassphp) project is an
|
|
|
|
|
updated fork of an
|
|
|
|
|
[older PHP version](https://github.com/jamierumbelow/sassphp).
|
2014-10-04 00:17:39 +02:00
|
|
|
|
|
|
|
|
|
%li#python
|
|
|
|
|
:markdown
|
|
|
|
|
### Python
|
2016-09-17 12:11:34 +02:00
|
|
|
|
There are two python projects that are updated regularly. The
|
|
|
|
|
[libsass-python](https://github.com/dahlia/libsass-python) project (there
|
|
|
|
|
are more details on
|
|
|
|
|
[its own website](http://hongminhee.org/libsass-python/)) and the
|
|
|
|
|
[python-scss](https://github.com/pistolero/python-scss) project.
|
2015-04-01 05:12:33 +02:00
|
|
|
|
|
2016-09-17 12:11:34 +02:00
|
|
|
|
Two other python projects,
|
|
|
|
|
[pylibsass](https://github.com/rsenk330/pylibsass) and
|
|
|
|
|
[SassPython](https://github.com/marianoguerra/SassPython), haven't been
|
|
|
|
|
updated in a while.
|
2014-10-04 00:17:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%li#ruby
|
|
|
|
|
:markdown
|
|
|
|
|
### Ruby
|
2016-09-17 12:11:34 +02:00
|
|
|
|
LibSass has also been ported back into ruby, for the
|
|
|
|
|
[sassc-ruby](https://github.com/sass/sassc-ruby) project.
|
2014-10-04 00:17:39 +02:00
|
|
|
|
|
|
|
|
|
%li#scala
|
|
|
|
|
:markdown
|
|
|
|
|
### Scala
|
2016-09-17 12:11:34 +02:00
|
|
|
|
The only scala project, [Sass-Scala](https://github.com/kkung/Sass-Scala),
|
|
|
|
|
hasn't been updated in a couple of years.
|
2014-07-11 04:28:14 +02:00
|
|
|
|
|
2016-02-27 13:58:18 +01:00
|
|
|
|
%h2 About LibSass
|
2014-07-11 04:28:14 +02:00
|
|
|
|
|
|
|
|
|
:markdown
|
|
|
|
|
This project is the brainchild of
|
2015-04-02 01:51:37 +02:00
|
|
|
|
[Hampton Catlin](http://twitter.com/hcatlin), the original creator of Sass,
|
2014-07-11 04:28:14 +02:00
|
|
|
|
and is sponsored by [Moovweb](http://moovweb.com/).
|
|
|
|
|
[Aaron Leung](http://github.com/akhleung) from Moovweb is the primary
|
|
|
|
|
developer.
|
|
|
|
|
|
|
|
|
|
%figure
|
2015-04-02 01:51:37 +02:00
|
|
|
|
= image_tag "logos/libsass.png", alt: "LibSass logo"
|
2014-07-11 04:28:14 +02:00
|
|
|
|
|
|
|
|
|
- content_for :complementary do
|
2014-10-04 00:17:39 +02:00
|
|
|
|
%h3 Wrappers
|
|
|
|
|
%ul.anchors
|
2015-04-02 01:51:37 +02:00
|
|
|
|
%li= link_to "SassC", "#sassc"
|
2014-10-04 00:17:39 +02:00
|
|
|
|
%li= link_to "Go", "#go"
|
|
|
|
|
%li= link_to "Java", "#java"
|
|
|
|
|
%li= link_to "JavaScript", "#javascript"
|
|
|
|
|
%li= link_to "Lua", "#lua"
|
|
|
|
|
%li= link_to ".NET", "#net"
|
|
|
|
|
%li= link_to "Node", "#node"
|
|
|
|
|
%li= link_to "Perl", "#perl"
|
|
|
|
|
%li= link_to "PHP", "#php"
|
|
|
|
|
%li= link_to "Python", "#python"
|
|
|
|
|
%li= link_to "Ruby", "#ruby"
|
|
|
|
|
%li= link_to "Scala", "#scala"
|
|
|
|
|
|
|
|
|
|
|
2014-07-11 04:28:14 +02:00
|
|
|
|
%h3 Resources
|
|
|
|
|
|
|
|
|
|
%ul
|
|
|
|
|
- for project in data.libsass.resources
|
|
|
|
|
%li
|
|
|
|
|
= link_to project.name, project.url
|
|
|
|
|
—
|
|
|
|
|
= project.description
|