Pure Go sass scanner, ast, and parser
Cross platform compiler for Sass
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 ❓
- Full Support
- No Support
Passing 34 of the basic Sass tests in sass-spec
See functions
- Nested Rules
- Referencing Parent Selectors: &
- Nested Properties
- Placeholder Selectors: %foo
- Comments: /* */ and //
- SassScript ❓
- Variables: $ ❓
- Data Types ❓
- 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 ❓
- 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 ❓
- @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 ❓
- Passing Content Blocks to a Mixin
- Variable Scope and Content Blocks
- Function Directives ❓
- Extending Sass
- Defining Custom Sass Functions