@less/test-data 4.6.4 → 4.6.6

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.4",
6
+ "version": "4.6.6",
7
7
  "description": "Less files and CSS results",
8
8
  "author": "Alexis Sellier <self@cloudhead.net>",
9
9
  "contributors": [
@@ -47,3 +47,13 @@
47
47
  color: red;
48
48
  width: 2;
49
49
  }
50
+ @supports (display: grid) {
51
+ .supports-rule {
52
+ color: green;
53
+ }
54
+ /* line 38, {path}linenumbers.less */
55
+ @media -sass-debug-info{filename{font-family:file\:\/\/{pathesc}linenumbers\.less}line{font-family:\0000338}}
56
+ .supports-rule .nested-supports {
57
+ color: blue;
58
+ }
59
+ }
@@ -38,3 +38,12 @@
38
38
  color: red;
39
39
  width: 2;
40
40
  }
41
+ @supports (display: grid) {
42
+ .supports-rule {
43
+ color: green;
44
+ }
45
+ /* line 38, {path}linenumbers.less */
46
+ .supports-rule .nested-supports {
47
+ color: blue;
48
+ }
49
+ }
@@ -30,4 +30,13 @@
30
30
  width: 2;
31
31
  }
32
32
  }
33
+ }
34
+
35
+ .supports-rule {
36
+ @supports (display: grid) {
37
+ color: green;
38
+ .nested-supports {
39
+ color: blue;
40
+ }
41
+ }
33
42
  }
@@ -38,3 +38,12 @@
38
38
  color: red;
39
39
  width: 2;
40
40
  }
41
+ @supports (display: grid) {
42
+ .supports-rule {
43
+ color: green;
44
+ }
45
+ @media -sass-debug-info{filename{font-family:file\:\/\/{pathesc}linenumbers\.less}line{font-family:\0000338}}
46
+ .supports-rule .nested-supports {
47
+ color: blue;
48
+ }
49
+ }
@@ -34,3 +34,9 @@
34
34
  .color-rgb-div {
35
35
  background: rgb(from #0000FF calc(r / 2) g b);
36
36
  }
37
+ .color-rgb-sub-right-operand {
38
+ background: rgb(from blue calc(100 - r) g b);
39
+ }
40
+ .color-rgb-add-left-operand {
41
+ background: rgb(from blue calc(r + 100) g b);
42
+ }
@@ -46,3 +46,11 @@
46
46
  .color-rgb-div {
47
47
  background: rgb(from #0000FF calc(r / 2) g b);
48
48
  }
49
+
50
+ .color-rgb-sub-right-operand {
51
+ background: rgb(from blue calc(100 - r) g b);
52
+ }
53
+
54
+ .color-rgb-add-left-operand {
55
+ background: rgb(from blue calc(r + 100) g b);
56
+ }
@@ -130,6 +130,46 @@
130
130
  margin: 0.5em 0 0 0;
131
131
  }
132
132
  }
133
+ @container card (width > 400px), style(--responsive: true), scroll-state(stuck: top) {
134
+ h2 {
135
+ font-size: 1.5em;
136
+ }
137
+ }
138
+ @container style(--theme) {
139
+ .style-query {
140
+ color: red;
141
+ }
142
+ }
143
+ @container style((--theme: one) or (--theme: two)) {
144
+ .style-query-list {
145
+ color: blue;
146
+ }
147
+ }
148
+ @container contactBody (min-width: 1300px) {
149
+ .named-container {
150
+ width: 25%;
151
+ }
152
+ }
153
+ @container _body (min-width: 1300px) {
154
+ .underscored-container {
155
+ width: 25%;
156
+ }
157
+ }
158
+ @container --body (min-width: 1300px) {
159
+ .custom-ident-container {
160
+ width: 25%;
161
+ }
162
+ }
163
+ @container contact\.body (min-width: 1300px) {
164
+ .escaped-container {
165
+ width: 25%;
166
+ }
167
+ }
168
+ @container café (min-width: 1300px) {
169
+ .nonascii-container {
170
+ width: 25%;
171
+ }
172
+ }
133
173
  @container (width < 500px) or (height < 500px) and (orientation: portrait) {
134
174
  .card-content p {
135
175
  padding: 0;
@@ -268,8 +308,31 @@
268
308
  font-size: 75%;
269
309
  }
270
310
  }
311
+ @container sidebar (min-width: 400px), scroll-state(stuck: top) {
312
+ #sticky-child {
313
+ font-size: 80%;
314
+ }
315
+ }
271
316
  @container foo (min-width: 400px) {
272
317
  #sticky-child {
273
318
  font-size: 75%;
274
319
  }
275
320
  }
321
+ .mixin-container-test {
322
+ color: red;
323
+ }
324
+ @container name (width < 125px) {
325
+ .mixin-container-test {
326
+ display: none;
327
+ }
328
+ }
329
+ @container sidebar (width < 500px) {
330
+ .sidebar-test {
331
+ display: none;
332
+ }
333
+ }
334
+ @container header (width < 800px) {
335
+ .header-test {
336
+ display: none;
337
+ }
338
+ }
@@ -159,6 +159,54 @@
159
159
  }
160
160
  }
161
161
 
162
+ @container card (width > 400px), style(--responsive: true), scroll-state(stuck: top) {
163
+ h2 {
164
+ font-size: 1.5em;
165
+ }
166
+ }
167
+
168
+ @container style(--theme) {
169
+ .style-query {
170
+ color: red;
171
+ }
172
+ }
173
+
174
+ @container style((--theme: one) or (--theme: two)) {
175
+ .style-query-list {
176
+ color: blue;
177
+ }
178
+ }
179
+
180
+ @container contactBody (min-width: 1300px) {
181
+ .named-container {
182
+ width: 25%;
183
+ }
184
+ }
185
+
186
+ @container _body (min-width: 1300px) {
187
+ .underscored-container {
188
+ width: 25%;
189
+ }
190
+ }
191
+
192
+ @container --body (min-width: 1300px) {
193
+ .custom-ident-container {
194
+ width: 25%;
195
+ }
196
+ }
197
+
198
+ @container contact\.body (min-width: 1300px) {
199
+ .escaped-container {
200
+ width: 25%;
201
+ }
202
+ }
203
+
204
+ @container café (min-width: 1300px) {
205
+ .nonascii-container {
206
+ width: 25%;
207
+ }
208
+ }
209
+
162
210
  @container ( width < 500px ) or (height<500px) and (orientation: portrait) {
163
211
  .card-content p {
164
212
  padding: 0;
@@ -319,6 +367,12 @@
319
367
  }
320
368
  }
321
369
 
370
+ @container sidebar (min-width: 400px), scroll-state(stuck: top) {
371
+ #sticky-child {
372
+ font-size: 80%;
373
+ }
374
+ }
375
+
322
376
  @varfoo: foo;
323
377
  @threshold: 400px;
324
378
  @container @varfoo (min-width: @threshold) {
@@ -326,3 +380,27 @@
326
380
  font-size: 75%;
327
381
  }
328
382
  }
383
+
384
+ // Regression test: mixin with variable container name and variable query condition
385
+ // Issue: mixins with parameters using @container @name (condition < @var) failed
386
+ // with "variable @bp is undefined" error in older versions
387
+ @issue-width: 125px;
388
+
389
+ .container-query-mixin(@container-name; @bp) {
390
+ @container @container-name (width < @bp) {
391
+ display: none;
392
+ }
393
+ }
394
+
395
+ .mixin-container-test {
396
+ .container-query-mixin(name, @issue-width);
397
+ color: red;
398
+ }
399
+
400
+ // Verify multiple calls with different params produce correct output
401
+ .sidebar-test {
402
+ .container-query-mixin(sidebar, 500px);
403
+ }
404
+ .header-test {
405
+ .container-query-mixin(header, 800px);
406
+ }
@@ -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
+