Awesome
sass
Pure Go sass scanner, ast, and parser
Cross platform compiler for Sass
Usage
go get -u github.com/wellington/sass/sass
sass compile [-o file.css] input.scss
This project is currently in alpha, and contains no compiler. A scanner and parser are being developed to support a future compiler.
To help, check out parser. This project contains tests that iterate through sass-spec running the parser against example inputs. Errors detected by the parser are reported. However, you could also set the Parser mode to Trace
and verify proper ast trees are being built from the input. As the parser matures, output can automatically be verified by the example outputs in these directories.
Glossary
- Partial Support :question:
- Full Support
- No Support
Compiler Status
Passing 34 of the basic Sass tests in sass-spec
Function Status
See functions
Parser Status
- Nested Rules
- Referencing Parent Selectors: &
- Nested Properties
- Placeholder Selectors: %foo
- Comments: /* */ and //
- SassScript :question:
- Variables: $ :question:
- Data Types :question:
- Strings
- Lists (space and comma delimited)
- Maps
- Colors
- Operations
- Number Operations
- Division and /
- Subtraction, Negative Numbers, and -
- Color Operations
- String Operations
- Boolean Operations
- List Operations
- Parentheses :question:
- Functions
- Keyword Arguments
- Interpolation: #{} (there are still edge cases with support)
- & in SassScript
- Variable Defaults: !default
- @-Rules and Directives
- @import
- @media
- @extend
- Extending Complex Selectors
- Multiple Extends
- Chaining Extends
- Selector Sequences
- Merging Selector Sequences
- @extend-Only Selectors
- The !optional Flag
- @extend in Directives
- @at-root
- @at-root (without: ...) and @at-root (with: ...)
- @debug
- @warn
- @error
- Control Directives & Expressions
- if()
- @if
- @else if :question:
- @else
- @for
- @each
- Multiple Assignment
- @while
- url(/local/path)
- url(http://remote/path)
- Mixin Directives
- Defining a Mixin: @mixin
- Including a Mixin: @include
- Arguments
- Literal arguments foo(one, two)
- Keyword Arguments foo($y: two, $x: one)
- Variable Arguments :question:
- Passing Content Blocks to a Mixin
- Variable Scope and Content Blocks
- Function Directives :question:
- Extending Sass
- Defining Custom Sass Functions