@less/test-data 4.6.7 → 4.7.0
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-config/at-rules-compressed-evaluation/at-rules-compressed-evaluation.less +1 -1
- package/tests-unit/at-rule-variable-deprecated/at-rule-variable-deprecated.css +45 -0
- package/tests-unit/at-rule-variable-deprecated/at-rule-variable-deprecated.less +76 -0
- package/tests-unit/container/container.css +15 -0
- package/tests-unit/container/container.less +21 -2
- package/tests-unit/import/import/import-reference.less +2 -2
- package/tests-unit/layer/layer.less +1 -1
- package/tests-unit/media/media.less +2 -2
- package/tests-unit/permissive-parse/permissive-parse.less +2 -2
- package/tests-unit/variables-in-at-rules/variables-in-at-rules.less +3 -3
package/package.json
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@media only screen and (max-width: 200px) {
|
|
2
|
+
.body {
|
|
3
|
+
width: 480px;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
@media all and (tv) {
|
|
7
|
+
.all-and-tv {
|
|
8
|
+
var: yes;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
@media screen, print {
|
|
12
|
+
.list {
|
|
13
|
+
margin: 0;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
@container foo (min-width: 400px) {
|
|
17
|
+
.sticky-child {
|
|
18
|
+
font-size: 75%;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
@supports (display: flex) {
|
|
22
|
+
.flex {
|
|
23
|
+
display: flex;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
@supports (display: grid) and (gap: 1rem) {
|
|
27
|
+
.grid {
|
|
28
|
+
display: grid;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
@keyframes enlarger {
|
|
32
|
+
from {
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
}
|
|
35
|
+
to {
|
|
36
|
+
font-size: 15px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
@namespace less "http://lesscss.org";
|
|
40
|
+
@namespace svgns "http://www.w3.org/2000/svg";
|
|
41
|
+
@layer base {
|
|
42
|
+
.layered {
|
|
43
|
+
color: red;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Backward-compatibility coverage for the deprecated bare `@variable`
|
|
2
|
+
// reference in non-value positions (at-rule preludes, names, and identifiers).
|
|
3
|
+
// These still resolve, but emit a `variable-in-at-rule-prelude` deprecation
|
|
4
|
+
// warning at parse time. New code should use `@{variable}` interpolation
|
|
5
|
+
// instead (see media.less / variables-in-at-rules.less).
|
|
6
|
+
|
|
7
|
+
// --- nestable at-rule preludes ---
|
|
8
|
+
@smartphone: ~"only screen and (max-width: 200px)";
|
|
9
|
+
@media @smartphone {
|
|
10
|
+
.body {
|
|
11
|
+
width: 480px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@all: ~"all";
|
|
16
|
+
@tv: ~"(tv)";
|
|
17
|
+
@media @all and @tv {
|
|
18
|
+
.all-and-tv {
|
|
19
|
+
var: yes;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@breakpoint: screen;
|
|
24
|
+
@media @breakpoint, print {
|
|
25
|
+
.list {
|
|
26
|
+
margin: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@varfoo: foo;
|
|
31
|
+
@threshold: 400px;
|
|
32
|
+
@container @varfoo (min-width: @threshold) {
|
|
33
|
+
.sticky-child {
|
|
34
|
+
font-size: 75%;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// --- unknown at-rule prelude (structural bare variable — deprecated) ---
|
|
39
|
+
@supported: ~"(display: flex)";
|
|
40
|
+
@supports @supported {
|
|
41
|
+
.flex {
|
|
42
|
+
display: flex;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// A bare @variable in a *nested declaration value* (inside `(...)`) is NOT a
|
|
47
|
+
// structural position — it is a declaration value and remains valid without a
|
|
48
|
+
// deprecation warning, mirroring `@media (min-width: @var)`.
|
|
49
|
+
@disp: grid;
|
|
50
|
+
@supports (display: @disp) and (gap: 1rem) {
|
|
51
|
+
.grid {
|
|
52
|
+
display: grid;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// --- at-rule identifiers / names ---
|
|
57
|
+
@anim: enlarger;
|
|
58
|
+
@keyframes @anim {
|
|
59
|
+
from { font-size: 12px; }
|
|
60
|
+
to { font-size: 15px; }
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@ns: less;
|
|
64
|
+
@namespace @ns "http://lesscss.org";
|
|
65
|
+
|
|
66
|
+
// indirect (variable-variable) prefix — also a deprecated bare reference
|
|
67
|
+
@ns-ref: svg;
|
|
68
|
+
@svg: svgns;
|
|
69
|
+
@namespace @@ns-ref "http://www.w3.org/2000/svg";
|
|
70
|
+
|
|
71
|
+
@layer-name: base;
|
|
72
|
+
@layer @layer-name {
|
|
73
|
+
.layered {
|
|
74
|
+
color: red;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -336,3 +336,18 @@
|
|
|
336
336
|
display: none;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
+
@container style(var(--n) = 3) {
|
|
340
|
+
.style-query-eq {
|
|
341
|
+
color: red;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
@container style(calc(6 / 2) = var(--n)) {
|
|
345
|
+
.style-query-calc-eq {
|
|
346
|
+
color: blue;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
@container style(var(--size) > 1lh) {
|
|
350
|
+
.style-query-gt {
|
|
351
|
+
color: green;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
@@ -375,7 +375,7 @@
|
|
|
375
375
|
|
|
376
376
|
@varfoo: foo;
|
|
377
377
|
@threshold: 400px;
|
|
378
|
-
@container @varfoo (min-width: @threshold) {
|
|
378
|
+
@container @{varfoo} (min-width: @threshold) {
|
|
379
379
|
#sticky-child {
|
|
380
380
|
font-size: 75%;
|
|
381
381
|
}
|
|
@@ -387,7 +387,7 @@
|
|
|
387
387
|
@issue-width: 125px;
|
|
388
388
|
|
|
389
389
|
.container-query-mixin(@container-name; @bp) {
|
|
390
|
-
@container @container-name (width < @bp) {
|
|
390
|
+
@container @{container-name} (width < @bp) {
|
|
391
391
|
display: none;
|
|
392
392
|
}
|
|
393
393
|
}
|
|
@@ -404,3 +404,22 @@
|
|
|
404
404
|
.header-test {
|
|
405
405
|
.container-query-mixin(header, 800px);
|
|
406
406
|
}
|
|
407
|
+
|
|
408
|
+
// Range/comparison syntax in @container style() queries (issue #4460)
|
|
409
|
+
@container style(var(--n) = 3) {
|
|
410
|
+
.style-query-eq {
|
|
411
|
+
color: red;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
@container style(calc(6 / 2) = var(--n)) {
|
|
416
|
+
.style-query-calc-eq {
|
|
417
|
+
color: blue;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
@container style(var(--size) > 1lh) {
|
|
422
|
+
.style-query-gt {
|
|
423
|
+
color: green;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
.mixin-with-directives(@keyframeName) {
|
|
76
|
-
@keyframes @keyframeName {
|
|
76
|
+
@keyframes @{keyframeName} {
|
|
77
77
|
@rules1();
|
|
78
78
|
}
|
|
79
79
|
@supports (animation-name: test) {
|
|
80
|
-
@keyframes @keyframeName {
|
|
80
|
+
@keyframes @{keyframeName} {
|
|
81
81
|
@rules2();
|
|
82
82
|
}
|
|
83
83
|
.selector {
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
.mediaMixin();
|
|
108
108
|
}
|
|
109
109
|
@smartphone: ~"only screen and (max-width: 200px)";
|
|
110
|
-
@media @smartphone {
|
|
110
|
+
@media @{smartphone} {
|
|
111
111
|
.body {
|
|
112
112
|
width: 480px;
|
|
113
113
|
}
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
}
|
|
227
227
|
@all: ~"all";
|
|
228
228
|
@tv: ~"(tv)";
|
|
229
|
-
@media @all and @tv {
|
|
229
|
+
@media @{all} and @{tv} {
|
|
230
230
|
.all-and-tv-variables {
|
|
231
231
|
var: all-and-tv;
|
|
232
232
|
}
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
|
|
39
39
|
@size: 640px;
|
|
40
40
|
@tablet: (min-width: @size);
|
|
41
|
-
@media @tablet {
|
|
41
|
+
@media @{tablet} {
|
|
42
42
|
.holy-crap {
|
|
43
43
|
this: works;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
@tablet: (min-width: @{size});
|
|
47
|
-
@media @tablet {
|
|
47
|
+
@media @{tablet} {
|
|
48
48
|
.with-curly {
|
|
49
49
|
this: works;
|
|
50
50
|
}
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
@charset "UTF-@{Eight}";
|
|
3
3
|
|
|
4
4
|
@ns: less;
|
|
5
|
-
@namespace @ns "http://lesscss.org";
|
|
5
|
+
@namespace @{ns} "http://lesscss.org";
|
|
6
6
|
|
|
7
7
|
@name: enlarger;
|
|
8
|
-
@keyframes @name {
|
|
8
|
+
@keyframes @{name} {
|
|
9
9
|
from {font-size: 12px;}
|
|
10
10
|
to {font-size: 15px;}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.m(reducer);
|
|
14
14
|
.m(@name) {
|
|
15
|
-
@-webkit-keyframes @name {
|
|
15
|
+
@-webkit-keyframes @{name} {
|
|
16
16
|
from {font-size: 13px;}
|
|
17
17
|
to {font-size: 10px;}
|
|
18
18
|
}
|