public function IssuesTest::test_extend_issue54 in Sassy 7.3
Same name and namespace in other branches
- 7 phamlp/tests/tests_issues.php \IssuesTest::test_extend_issue54()
File
- phpsass/
tests/ tests_issues.php, line 21
Class
Code
public function test_extend_issue54() {
$source = <<<END
\$test-var: 1;
@mixin catch-my-error(\$align: right) {
\$align: unquote(\$align);
@if \$align == right {
.test-right-cls {
text-align: right;
}
}
@else if \$align == left {
.test-left-cls {
text-align: left;
}
}
@else {
.test-else-cls {
text-align: none;
}
}
}
.cls-1 {
@include catch-my-error(right);
}
.cls-2 {
@include catch-my-error(left);
}
.cls-3 {
@if \$test-var == 2 {
padding: 10px;
}
@else if \$test-var == 1 {
.test-1-cls {
padding: 0;
}
}
}
END;
$expected = <<<END
.cls-1 .test-right-cls {
text-align: right;
}
.cls-2 .test-left-cls {
text-align: left;
}
.cls-3 .test-1-cls {
padding: 0;
}
END;
$this
->assertScss($source, $expected);
}