@less/test-data 4.6.4 → 4.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/tests-unit/container/container.css +18 -0
- package/tests-unit/container/container.less +24 -0
- package/tests-unit/functions/functions.css +4 -0
- package/tests-unit/functions/functions.less +6 -0
- package/tests-unit/media/media.css +5 -0
- package/tests-unit/media/media.less +6 -0
- package/tests-unit/mixins-guards/mixins-guards.css +6 -0
- package/tests-unit/mixins-guards/mixins-guards.less +11 -0
package/package.json
CHANGED
|
@@ -273,3 +273,21 @@
|
|
|
273
273
|
font-size: 75%;
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
+
.mixin-container-test {
|
|
277
|
+
color: red;
|
|
278
|
+
}
|
|
279
|
+
@container name (width < 125px) {
|
|
280
|
+
.mixin-container-test {
|
|
281
|
+
display: none;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
@container sidebar (width < 500px) {
|
|
285
|
+
.sidebar-test {
|
|
286
|
+
display: none;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
@container header (width < 800px) {
|
|
290
|
+
.header-test {
|
|
291
|
+
display: none;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
@@ -326,3 +326,27 @@
|
|
|
326
326
|
font-size: 75%;
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
+
|
|
330
|
+
// Regression test: mixin with variable container name and variable query condition
|
|
331
|
+
// Issue: mixins with parameters using @container @name (condition < @var) failed
|
|
332
|
+
// with "variable @bp is undefined" error in older versions
|
|
333
|
+
@issue-width: 125px;
|
|
334
|
+
|
|
335
|
+
.container-query-mixin(@container-name; @bp) {
|
|
336
|
+
@container @container-name (width < @bp) {
|
|
337
|
+
display: none;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.mixin-container-test {
|
|
342
|
+
.container-query-mixin(name, @issue-width);
|
|
343
|
+
color: red;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// Verify multiple calls with different params produce correct output
|
|
347
|
+
.sidebar-test {
|
|
348
|
+
.container-query-mixin(sidebar, 500px);
|
|
349
|
+
}
|
|
350
|
+
.header-test {
|
|
351
|
+
.container-query-mixin(header, 800px);
|
|
352
|
+
}
|
|
@@ -224,6 +224,8 @@ html {
|
|
|
224
224
|
a: true;
|
|
225
225
|
b: false;
|
|
226
226
|
c: false;
|
|
227
|
+
d: true;
|
|
228
|
+
e: false;
|
|
227
229
|
}
|
|
228
230
|
#if {
|
|
229
231
|
a: 1;
|
|
@@ -236,6 +238,8 @@ html {
|
|
|
236
238
|
i: 6;
|
|
237
239
|
j: 8;
|
|
238
240
|
k: 1;
|
|
241
|
+
m: 1;
|
|
242
|
+
n: 2;
|
|
239
243
|
l: black;
|
|
240
244
|
/* results in void */
|
|
241
245
|
color: green;
|
|
@@ -256,6 +256,9 @@ html {
|
|
|
256
256
|
a: boolean(not(2 < 1));
|
|
257
257
|
b: boolean(not(2 > 1) and (true));
|
|
258
258
|
c: boolean(not(boolean(true)));
|
|
259
|
+
// not without parentheses (should behave the same as with parentheses)
|
|
260
|
+
d: boolean(not false);
|
|
261
|
+
e: boolean(not true);
|
|
259
262
|
}
|
|
260
263
|
|
|
261
264
|
#if {
|
|
@@ -271,6 +274,9 @@ html {
|
|
|
271
274
|
i: if(true and isnumber(6), 6, 8);
|
|
272
275
|
j: if(not(true) and true, 6, 8);
|
|
273
276
|
k: if(true or true, 1);
|
|
277
|
+
// not without parentheses
|
|
278
|
+
m: if(not false, 1, 2);
|
|
279
|
+
n: if(not true, 1, 2);
|
|
274
280
|
|
|
275
281
|
// see: https://github.com/less/less.js/issues/3371
|
|
276
282
|
@some: foo;
|
|
@@ -356,3 +356,14 @@
|
|
|
356
356
|
.orderOfEvaluation(true, true, false);
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
+
// not without parentheses should work the same as not with parentheses
|
|
360
|
+
.test-not-noparens (@a) when not @a {
|
|
361
|
+
content: "not without parens false.";
|
|
362
|
+
}
|
|
363
|
+
.test-not-noparens (@a) when (@a) {
|
|
364
|
+
content: "not without parens true.";
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.test-not-noparens1 { .test-not-noparens(true) }
|
|
368
|
+
.test-not-noparens2 { .test-not-noparens(false) }
|
|
369
|
+
|