Skip to content

Commit 82ca890

Browse files
committed
cleanup leafo#90
1 parent 36fc924 commit 82ca890

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

scss.inc.php

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -687,20 +687,15 @@ protected function compileChild($child, $out) {
687687
$this->throwError("Unexpected @content inside of mixin");
688688
}
689689

690-
if(is_object($content)) {
691-
$this->storeEnv = $content->scope;
692-
if(count($content->children) > 0) {
693-
foreach ($content->children as $child) {
694-
if($child[0] == "include" || $child[0] == "block") {
695-
$this->storeEnv = @$content->parent;
696-
}
697-
$this->compileChild($child, $out);
698-
$this->storeEnv = $content->scope;
699-
}
700-
}
690+
foreach ($content->children as $child) {
691+
$this->storeEnv = ($child[0] == 'include' || $child[0] == 'block')
692+
? null
693+
: $content->scope;
701694

702-
unset($this->storeEnv);
695+
$this->compileChild($child, $out);
703696
}
697+
698+
unset($this->storeEnv);
704699
break;
705700
case "debug":
706701
list(,$value, $pos) = $child;

tests/inputs/mixins.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,4 @@ div {
139139

140140
@include content-with-arg($background: purple) {
141141
@include something(orange);
142-
}
142+
}

0 commit comments

Comments
 (0)