Skip to content

Commit 98a0a8a

Browse files
authored
Merge pull request #1471 from mgreter/todo/issue-2975
Add todo spec test for libsass issue 2975
2 parents 4a50219 + c7991ba commit 98a0a8a

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<===> input.scss
2+
@mixin test($name: false) {
3+
$a: "";
4+
$b: "";
5+
@if $name {
6+
$a: "-#{$name}"; // works as expected
7+
$b: -$name; // here occurs the bug
8+
} @else {
9+
$a: "";
10+
$b: "";
11+
}
12+
13+
.test-a#{$a} {
14+
display: block;
15+
}
16+
.test-b#{$b} {
17+
display: block;
18+
}
19+
}
20+
21+
@include test;
22+
@include test(asdf);
23+
@include test(foo1);
24+
@include test(bar1);
25+
// @include test("foo2");
26+
// @include test("bar2");
27+
28+
<===> output.css
29+
.test-a {
30+
display: block;
31+
}
32+
33+
.test-b {
34+
display: block;
35+
}
36+
37+
.test-a-asdf {
38+
display: block;
39+
}
40+
41+
.test-b-asdf {
42+
display: block;
43+
}
44+
45+
.test-a-foo1 {
46+
display: block;
47+
}
48+
49+
.test-b-foo1 {
50+
display: block;
51+
}
52+
53+
.test-a-bar1 {
54+
display: block;
55+
}
56+
57+
.test-b-bar1 {
58+
display: block;
59+
}

0 commit comments

Comments
 (0)