Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,6 @@ protected function compileMedia(Block $media)

$this->scope->children[] = $annotation;
}

}

$this->compileChildrenNoReturn($media->children, $this->scope);
Expand Down Expand Up @@ -2630,6 +2629,9 @@ protected function reduce($value, $inExp = false)

case Type::T_INTERPOLATE:
$value[1] = $this->reduce($value[1]);
if ($inExp) {
return $value[1];
}

return $value;

Expand Down Expand Up @@ -3372,7 +3374,7 @@ protected function multiplySelectors(Environment $env, $selfParent = null)
$selectors[serialize($s)] = $s;
}
} else {
$s = $this->joinSelectors($parent, $selector,$stillHasSelf);
$s = $this->joinSelectors($parent, $selector, $stillHasSelf);
$selectors[serialize($s)] = $s;
}
}
Expand Down
7 changes: 7 additions & 0 deletions tests/inputs/interpolation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,11 @@ div {

.pagination {
@include pagination-mixin(5px);
}

@mixin set-border($width) {
border: $width solid #000;
}
.element {
@include set-border(#{2px}); // compiles to "2px solid #000"
}
3 changes: 3 additions & 0 deletions tests/outputs/interpolation.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,6 @@ a.badge {

.pagination .page-item:first-child .page-link {
border-radius: 5px; }

.element {
border: 2px solid #000; }
3 changes: 3 additions & 0 deletions tests/outputs_numbered/interpolation.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,6 @@ a.badge {
/* line 126, inputs/interpolation.scss */
.pagination .page-item:first-child .page-link {
border-radius: 5px; }
/* line 140, inputs/interpolation.scss */
.element {
border: 2px solid #000; }