Home

Awesome

C6

Hate waiting for SASS compiling your stylesheets with Compass over 10 seconds everytime? C6 helps you write style sheets with efficiency.

C6 is a SASS 3.2 compatible implementation written in Go. But wait! this is not only to implement SASS, but also to create a new language for better consistency, syntax and performance. And yes, this means we're free to accept new language feature requests.

Build Status Coverage Status GoDoc

wercker status

Installation

go get github.com/c9s/c6/cmd/c6

Working in progress

<!-- ## Features - [ ] import directory: https://github.com/sass/sass/issues/690 - [ ] import css as sass: https://github.com/sass/sass/issues/556 - [ ] import once: https://github.com/sass/sass/issues/139 - [ ] namespace and alias: https://github.com/sass/sass/issues/353 - [ ] `@use` directive: https://github.com/nex3/sass/issues/353#issuecomment-5146513 - [ ] conditional import: https://github.com/sass/sass/issues/451 - [ ] `@sprite` syntax sugar -->

Ambiguity

The original design of SASS contains a lot of grammar ambiguity.

for example, as SASS uses interpolation:

#{$name}:before {

}

Since nested properties are allowed, in the above code, we don't know if it's a selector or a property namespace if we don't know the $name variable.

Where before might be a property value or a part of the selector.

links:

To handle this kind of interpolation, we define a type of token named template:

#{$name}:before a {

}

In the above code, #{$name}:before a is treated as T_SELECTOR_TEMPLATE token, which type will be resolved at the runtime.

Self Benchmarking

BenchViz

FAQ

Why do you want to implement another SASS compiler?

The original SASS is written in Ruby and it's really slow, we take 11 seconds to compile the stylesheets of our application, libsass is fast but it does not catch up the ruby sass implementation , and you can't compile them with Compass. Since Go is simple, easy & fast, thus we implement SASS in Go to move faster.

Further, we want to design a new language (ECSS temporarily named) that is compatible with SASS 3.4 or even SASS 4.0 with more powerful features.

Reference

SASS Reference http://sass-lang.com/documentation/file.SASS_REFERENCE.html

A feature check list from libsass:

Standards:

SASS/CSS Frameworks, libraries:

Articles:

Contribution

Please open up an issue on GitHub before you put a lot efforts on pull request.

The code submitting to PR must be filtered with gofmt

Community

License

MPL License https://www.mozilla.org/MPL/2.0/

(MPL is like LGPL but with static/dynamic linking exception, which allows you to either dynamic/static link this library without permissions)

Bitdeli Badge