@less/test-data 4.6.3 → 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 CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "4.6.3",
6
+ "version": "4.6.5",
7
7
  "description": "Less files and CSS results",
8
8
  "author": "Alexis Sellier <self@cloudhead.net>",
9
9
  "contributors": [
@@ -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;
@@ -274,3 +274,8 @@
274
274
  color: red;
275
275
  }
276
276
  }
277
+ @media ((color) and (hover)), all {
278
+ body {
279
+ background: green;
280
+ }
281
+ }
@@ -302,3 +302,9 @@
302
302
  color: red;
303
303
  }
304
304
  }
305
+
306
+ @media ((color) and (hover)), all {
307
+ body {
308
+ background: green;
309
+ }
310
+ }
@@ -209,3 +209,9 @@
209
209
  no-parenthesis: evaluated true 4;
210
210
  with-parenthesis: evaluated true;
211
211
  }
212
+ .test-not-noparens1 {
213
+ content: "not without parens true.";
214
+ }
215
+ .test-not-noparens2 {
216
+ content: "not without parens false.";
217
+ }
@@ -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
+
@@ -197,3 +197,27 @@ a:is(.b, :is(.c)) {
197
197
  a:is(.b, :is(.c), :has(div)) {
198
198
  color: red;
199
199
  }
200
+ :is(:not(:has(>.foo)), :has(>.foo.bar)) {
201
+ overflow: clip;
202
+ }
203
+ :matches(:not(:has(>.foo)), :has(>.foo.bar)) {
204
+ overflow: clip;
205
+ }
206
+ :where(:not(:has(>.foo)), :has(>.foo.bar)) {
207
+ overflow: clip;
208
+ }
209
+ :is(:has(>.foo + .bar), :has(>.baz ~ .qux), :not(:has(.quux))) {
210
+ color: blue;
211
+ }
212
+ :where(.a, .b, .c) {
213
+ color: red;
214
+ }
215
+ :not(.a, .b, .c) {
216
+ color: green;
217
+ }
218
+ :where(:is(.a, .b), :has(>.c)) {
219
+ color: blue;
220
+ }
221
+ :is(:where(:has(.foo)), :not(:has(.bar))) {
222
+ color: purple;
223
+ }
@@ -216,3 +216,36 @@ a:is(.b, :is(.c)) {
216
216
  a:is(.b, :is(.c), :has(div)) {
217
217
  color: red;
218
218
  }
219
+
220
+ // https://github.com/less/less.js/issues/4378
221
+ :is(:not(:has(>.foo)), :has(>.foo.bar)) {
222
+ overflow: clip;
223
+ }
224
+
225
+ :matches(:not(:has(>.foo)), :has(>.foo.bar)) {
226
+ overflow: clip;
227
+ }
228
+
229
+ :where(:not(:has(>.foo)), :has(>.foo.bar)) {
230
+ overflow: clip;
231
+ }
232
+
233
+ :is(:has(>.foo + .bar), :has(>.baz ~ .qux), :not(:has(.quux))) {
234
+ color: blue;
235
+ }
236
+
237
+ :where(.a, .b, .c) {
238
+ color: red;
239
+ }
240
+
241
+ :not(.a, .b, .c) {
242
+ color: green;
243
+ }
244
+
245
+ :where(:is(.a, .b), :has(>.c)) {
246
+ color: blue;
247
+ }
248
+
249
+ :is(:where(:has(.foo)), :not(:has(.bar))) {
250
+ color: purple;
251
+ }