Skip to content

Commit ce51174

Browse files
committed
Add todo spec test for libsass issue 2980
sass/libsass#2980
1 parent 16a640b commit ce51174

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<===> input.scss
2+
$config: (
3+
phone: (
4+
break-point-width:0px,
5+
break-point-name: xs
6+
),
7+
tablet: (
8+
break-point-width:600px,
9+
break-point-name: sm
10+
),
11+
laptop: (
12+
break-point-width:900px,
13+
break-point-name: md
14+
),
15+
desktop: (
16+
break-point-width:1200px,
17+
break-point-name:lg
18+
),
19+
);
20+
21+
@each $key, $map in $config {
22+
$break-point-width: map_get($map, break-point-width);
23+
$break-point-name: map_get($map, break-point-name);
24+
$infix: if($break-point-width == 0px, null, -$break-point-name);
25+
.foo#{$infix} {
26+
content: '#{$break-point-name}';
27+
}
28+
}
29+
30+
<===> output.css
31+
.foo {
32+
content: "xs";
33+
}
34+
35+
.foo-sm {
36+
content: "sm";
37+
}
38+
39+
.foo-md {
40+
content: "md";
41+
}
42+
43+
.foo-lg {
44+
content: "lg";
45+
}

0 commit comments

Comments
 (0)