Skip to content

Commit 151009f

Browse files
authored
Merge pull request leafo#694 from Cerdic/Issue/leafo/486
Issue/leafo/486
2 parents e04b83c + 2b871b2 commit 151009f

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

src/Compiler.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,6 @@ protected function compileMedia(Block $media)
855855

856856
$this->scope->children[] = $annotation;
857857
}
858-
859858
}
860859

861860
$this->compileChildrenNoReturn($media->children, $this->scope);
@@ -2661,6 +2660,9 @@ protected function reduce($value, $inExp = false)
26612660

26622661
case Type::T_INTERPOLATE:
26632662
$value[1] = $this->reduce($value[1]);
2663+
if ($inExp) {
2664+
return $value[1];
2665+
}
26642666

26652667
return $value;
26662668

@@ -3402,7 +3404,7 @@ protected function multiplySelectors(Environment $env, $selfParent = null)
34023404
$selectors[serialize($s)] = $s;
34033405
}
34043406
} else {
3405-
$s = $this->joinSelectors($parent, $selector,$stillHasSelf);
3407+
$s = $this->joinSelectors($parent, $selector, $stillHasSelf);
34063408
$selectors[serialize($s)] = $s;
34073409
}
34083410
}

tests/inputs/interpolation.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,11 @@ div {
132132

133133
.pagination {
134134
@include pagination-mixin(5px);
135+
}
136+
137+
@mixin set-border($width) {
138+
border: $width solid #000;
139+
}
140+
.element {
141+
@include set-border(#{2px}); // compiles to "2px solid #000"
135142
}

tests/outputs/interpolation.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,6 @@ a.badge {
7474

7575
.pagination .page-item:first-child .page-link {
7676
border-radius: 5px; }
77+
78+
.element {
79+
border: 2px solid #000; }

tests/outputs_numbered/interpolation.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,6 @@ a.badge {
9393
/* line 126, inputs/interpolation.scss */
9494
.pagination .page-item:first-child .page-link {
9595
border-radius: 5px; }
96+
/* line 140, inputs/interpolation.scss */
97+
.element {
98+
border: 2px solid #000; }

0 commit comments

Comments
 (0)