mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Sass] [SCSS] Support @if.
This commit is contained in:
parent
b3d72dbf37
commit
e8a71b6e66
1 changed files with 7 additions and 1 deletions
|
@ -36,7 +36,7 @@ module Sass
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
DIRECTIVES = Set[:mixin, :include, :debug, :for]
|
DIRECTIVES = Set[:mixin, :include, :debug, :for, :if]
|
||||||
|
|
||||||
def directive
|
def directive
|
||||||
return unless name = tok(ATRULE)
|
return unless name = tok(ATRULE)
|
||||||
|
@ -97,6 +97,12 @@ module Sass
|
||||||
block(node(Sass::Tree::ForNode.new(var, from, to, exclusive)))
|
block(node(Sass::Tree::ForNode.new(var, from, to, exclusive)))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def if
|
||||||
|
expr = sass_script_parser.parse
|
||||||
|
ss
|
||||||
|
block(node(Sass::Tree::IfNode.new(expr)))
|
||||||
|
end
|
||||||
|
|
||||||
def variable
|
def variable
|
||||||
return unless raw '!'
|
return unless raw '!'
|
||||||
name = tok! IDENT
|
name = tok! IDENT
|
||||||
|
|
Loading…
Add table
Reference in a new issue