Skip to content

Commit 2b27dbb

Browse files
committed
vararg tests
1 parent 279c5c8 commit 2b27dbb

File tree

2 files changed

+73
-1
lines changed

2 files changed

+73
-1
lines changed

tests/inputs/pattern_matching.less

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,57 @@
111111
.border-radius(33);
112112
}
113113

114+
.hola(hello, @hello...) {
115+
color: blue;
116+
}
117+
118+
#hola {
119+
.hola(hello, world);
120+
.hola(jello, world);
121+
}
122+
123+
.resty(@hello, @world, @the_rest...) {
124+
padding: @hello @world;
125+
rest: @the_rest;
126+
}
127+
128+
#nnn {
129+
.body(10, 10, 10, 10, 10);
130+
.body(10, 10, 10);
131+
.body(10, 10);
132+
.body(10);
133+
.body();
134+
}
135+
136+
.defaults(@aa, @bb:e343, @cc: "heah", ...) {
137+
height: @aa;
138+
}
139+
140+
#defaults_1 {
141+
.defaults();
142+
.defaults(one);
143+
.defaults(two, one);
144+
.defaults(three, two, one);
145+
.defaults(four, three, two, one);
146+
}
147+
148+
149+
.thing() { color: green; }
150+
.thing(...) { color: blue; }
151+
.thing { color: red; }
152+
153+
#aa {
154+
.thing();
155+
}
156+
157+
#bb {
158+
.thing;
159+
}
160+
161+
162+
#cc {
163+
.thing(1);
164+
}
165+
166+
167+

tests/outputs/pattern_matching.css

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,22 @@
3434
}
3535
.only-right { right:33; }
3636
.only-left { left:33; }
37-
.left-right { both:330; }
37+
.left-right { both:330; }
38+
#hola { color:blue; }
39+
#defaults_1 {
40+
height:one;
41+
height:two;
42+
height:three;
43+
height:four;
44+
}
45+
.thing { color:red; }
46+
#aa {
47+
color:green;
48+
color:blue;
49+
color:red;
50+
}
51+
#bb {
52+
color:green;
53+
color:blue;
54+
color:red;
55+
}

0 commit comments

Comments
 (0)