mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Sass] [Less] Don't die when mixin args have operators.
This commit is contained in:
parent
ce742af7e2
commit
eaa39cc2e3
2 changed files with 3 additions and 2 deletions
|
@ -140,6 +140,7 @@ WARNING
|
|||
def to_sass_tree
|
||||
return if hide_in_sass
|
||||
mixin = Sass::Tree::MixinDefNode.new(name, @params.map do |v|
|
||||
v.value.flatten!
|
||||
[Sass::Script::Variable.new(v), v.value.to_sass_tree]
|
||||
end)
|
||||
rules.each {|r| mixin << r.to_sass_tree}
|
||||
|
|
|
@ -480,13 +480,13 @@ SCSS
|
|||
LESS
|
||||
|
||||
assert_renders <<SCSS, <<LESS
|
||||
@mixin foo($a: 2px, $b: red) {
|
||||
@mixin foo($a: 2px + 3px, $b: red) {
|
||||
a: $a; }
|
||||
|
||||
.bar {
|
||||
@include foo(5px); }
|
||||
SCSS
|
||||
.foo(@a: 2px, @b: #f00) {a: @a}
|
||||
.foo(@a: 2px + 3px, @b: #f00) {a: @a}
|
||||
.bar {.foo(5px);}
|
||||
LESS
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue