@less/test-data 4.3.0 → 4.4.2

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.
@@ -102,3 +102,39 @@
102
102
  --semi-transparent-dark-background: #001e00ee;
103
103
  --semi-transparent-dark-background-2: #001e00;
104
104
  }
105
+ .color-oklch-sub {
106
+ background: oklch(from #0000FF calc(l - 0.1) c h);
107
+ }
108
+ .color-oklch-add {
109
+ background: oklch(from #0000FF calc(l + 0.1) c h);
110
+ }
111
+ .color-oklch-mult {
112
+ background: oklch(from #0000FF calc(l * 0.1) c h);
113
+ }
114
+ .color-oklch-div {
115
+ background: oklch(from #0000FF calc(l / 2) c h);
116
+ }
117
+ .color-hsl-sub {
118
+ background: hsl(from #0000FF calc(h - 1) s l);
119
+ }
120
+ .color-hsl-add {
121
+ background: hsl(from #0000FF calc(h + 1) s l);
122
+ }
123
+ .color-hsl-mult {
124
+ background: hsl(from #0000FF calc(h * 1) s l);
125
+ }
126
+ .color-hsl-div {
127
+ background: hsl(from #0000FF calc(h / 2) s l);
128
+ }
129
+ .color-rgb-sub {
130
+ background: rgb(from #0000FF calc(r - 1) g b);
131
+ }
132
+ .color-rgb-add {
133
+ background: rgb(from #0000FF calc(r + 1) g b);
134
+ }
135
+ .color-rgb-mult {
136
+ background: rgb(from #0000FF calc(r * 1) g b);
137
+ }
138
+ .color-rgb-div {
139
+ background: rgb(from #0000FF calc(r / 2) g b);
140
+ }
@@ -78,6 +78,6 @@
78
78
  /* } */
79
79
  /*by block */
80
80
  #output-block {
81
- comment: /* // Not commented out // */;
81
+ --comment: /* // Not commented out // */;
82
82
  }
83
83
  /*comment on last line*/
@@ -204,7 +204,9 @@
204
204
  font-size: 1rem;
205
205
  }
206
206
  @media (hover: hover) {
207
- font-size: 1.75rem;
207
+ .foo {
208
+ font-size: 1.75rem;
209
+ }
208
210
  }
209
211
  }
210
212
  .media-2 {
@@ -220,9 +222,13 @@
220
222
  font-size: 1rem;
221
223
  }
222
224
  @media (hover: hover) {
223
- font-size: 1.75rem;
225
+ .foo {
226
+ font-size: 1.75rem;
227
+ }
224
228
  @media not all and (hover: hover) {
225
- color: limegreen;
229
+ .foo {
230
+ color: limegreen;
231
+ }
226
232
  }
227
233
  .media-3 {
228
234
  padding: 0.5rem;
@@ -235,9 +241,30 @@
235
241
  }
236
242
  @container (min-width: 768px) {
237
243
  @media only screen and (min-width: 768px) {
238
- color: aliceblue;
244
+ .foo {
245
+ color: aliceblue;
246
+ }
239
247
  }
240
248
  .container-1 {
241
249
  color: purple;
242
250
  }
243
251
  }
252
+ #sticky {
253
+ position: sticky;
254
+ container-type: scroll-state;
255
+ }
256
+ @container scroll-state(stuck: top) {
257
+ #sticky-child {
258
+ font-size: 75%;
259
+ }
260
+ }
261
+ @container scroll-state(snapped: x) {
262
+ #sticky-child {
263
+ font-size: 75%;
264
+ }
265
+ }
266
+ @container scroll-state(scrollable: top) {
267
+ #sticky-child {
268
+ font-size: 75%;
269
+ }
270
+ }
@@ -1,3 +1,4 @@
1
+ @namespace foo url(http://www.example.com);
1
2
  .comma-delimited {
2
3
  text-shadow: -1px -1px 1px red, 6px 5px 5px yellow;
3
4
  -moz-box-shadow: 0pt 0pt 2px rgba(255, 255, 255, 0.4) inset, 0pt 4px 6px rgba(255, 255, 255, 0.4) inset;
@@ -17,10 +18,10 @@
17
18
  p:not([class*="lead"]) {
18
19
  color: black;
19
20
  }
20
- input[type="text"].class#id[attr=32]:not(1) {
21
+ input[type="text"].class#id[attr=i32]:not(.one) {
21
22
  color: inherit;
22
23
  }
23
- div#id.class[a=1][b=2].class:not(1) {
24
+ div#id.class[a=one][b=two].class:not(.one) {
24
25
  color: inherit;
25
26
  }
26
27
  ul.comma > li:not(:only-child)::after {
@@ -88,7 +89,6 @@ p::before {
88
89
  @viewport {
89
90
  font-size: 10px;
90
91
  }
91
- @namespace foo url(http://www.example.com);
92
92
  foo|h1 {
93
93
  color: blue;
94
94
  }
@@ -109,15 +109,15 @@ h1 {
109
109
  display: block;
110
110
  }
111
111
  }
112
- ::distributed(input::placeholder) {
112
+ :not(input::placeholder) {
113
113
  color: #b3b3b3;
114
114
  }
115
115
  .shadow > .dom,
116
116
  body > .shadow {
117
117
  display: done;
118
118
  }
119
- :host(.sel .a),
120
- :host-context(.sel .b),
119
+ :host(.sel.a),
120
+ :host-context(.sel.b),
121
121
  .sel > .b,
122
122
  ::content .sel {
123
123
  type: shadow-dom;
@@ -28,4 +28,4 @@ ng\:form {
28
28
  textarea {
29
29
  font-family: 'helvetica neue', 'wenquanyi micro hei', \5FAE\8F6F\96C5\9ED1, \5B8B\4F53, sans-serif;
30
30
  }
31
- anything to unquote
31
+ /* anything to unquote */
@@ -15,7 +15,7 @@
15
15
  number-value: 12345678;
16
16
  color-value: blue;
17
17
  rgba-value: rgba(80, 160, 240, 0.67);
18
- empty-value: ;
18
+ --empty-value: ;
19
19
  name-length: 1;
20
20
  string-length: 1;
21
21
  number-length: 1;
@@ -229,7 +229,7 @@ html {
229
229
  a: 1;
230
230
  b: 2;
231
231
  c: 3;
232
- e: ;
232
+ --e: ;
233
233
  f: 6;
234
234
  g: 3;
235
235
  h: 5;
@@ -1,7 +1,7 @@
1
- input[type="text"].class#id[attr=32]:not(1) {
1
+ input[type="text"].class#id[attr=i32]:not(.one) {
2
2
  color: inherit;
3
3
  }
4
- div#id.class[a=1][b=2].class:not(1) {
4
+ div#id.class[a=one][b=two].class:not(.one) {
5
5
  color: inherit;
6
6
  }
7
7
  @media print {
@@ -8,7 +8,7 @@
8
8
  multiline: 2;
9
9
  }
10
10
  .scope {
11
- empty: ;
11
+ --empty: ;
12
12
  var: 42;
13
13
  escaped: 7px;
14
14
  }
@@ -0,0 +1,93 @@
1
+ @import url("/import/layer-import-2.css") layer(foo);
2
+ @import url("/import/layer-import-3.css") layer(responsive) supports(display: flex) screen and (max-width: 768px);
3
+ @import url("/import/layer-import-4.css") layer(print) print;
4
+ @import url("/import/layer-import-4.css") layer(print) print, (max-width: 600px);
5
+ @import url("/import/layer-import-5.css") layer(features) supports(display: grid);
6
+ @layer {
7
+ .main::before {
8
+ color: #f00;
9
+ }
10
+ }
11
+ @layer legacy {
12
+ .sub-rule ul {
13
+ color: white;
14
+ }
15
+ }
16
+ @layer primevue {
17
+ .test {
18
+ foo: bar;
19
+ }
20
+ }
21
+ @layer reset, base, components, utilities;
22
+ @layer reset {
23
+ *,
24
+ *::before,
25
+ *::after {
26
+ box-sizing: border-box;
27
+ }
28
+ }
29
+ @layer base {
30
+ body {
31
+ margin: 0;
32
+ font-family: system-ui, sans-serif;
33
+ }
34
+ body header {
35
+ background-color: #f0f0f0;
36
+ padding: 1rem;
37
+ }
38
+ }
39
+ @layer components {
40
+ .button {
41
+ display: inline-block;
42
+ padding: 0.5rem 1rem;
43
+ background-color: blue;
44
+ color: white;
45
+ }
46
+ .button:hover {
47
+ background-color: darkblue;
48
+ }
49
+ }
50
+ @layer utilities {
51
+ .text-center {
52
+ text-align: center;
53
+ }
54
+ .responsive {
55
+ width: 100%;
56
+ }
57
+ @media (min-width: 768px) {
58
+ .responsive {
59
+ width: 50%;
60
+ }
61
+ }
62
+ }
63
+ .parent {
64
+ color: black;
65
+ }
66
+ .parent .child {
67
+ color: red;
68
+ }
69
+ .parent:hover {
70
+ background: lightgray;
71
+ }
72
+ @layer foo.baz {
73
+ .bar {
74
+ font-weight: bold;
75
+ }
76
+ }
77
+ @layer framework {
78
+ @layer layout {
79
+ .container {
80
+ display: grid;
81
+ gap: 2rem;
82
+ }
83
+ }
84
+ }
85
+ @layer framework.layout {
86
+ main {
87
+ padding: 2rem;
88
+ }
89
+ p {
90
+ margin-block: 1rem;
91
+ color: #555;
92
+ }
93
+ }
@@ -241,11 +241,6 @@
241
241
  background: green;
242
242
  }
243
243
  }
244
- @media (example, all), speech {
245
- body {
246
- background: green;
247
- }
248
- }
249
244
  @media (min-orientation: portrait) {
250
245
  body {
251
246
  background: green;
@@ -1,4 +1,4 @@
1
- .123 {
1
+ .\123 {
2
2
  a: 0;
3
3
  }
4
4
  .foo {
@@ -132,14 +132,13 @@ p a span {
132
132
  color: #ff0000;
133
133
  }
134
134
  [prop],
135
- [prop=10%],
135
+ [prop=ten-percent],
136
136
  [prop|="value3"],
137
137
  [prop*="val3"],
138
138
  [|prop~="val3"],
139
139
  [*|prop$="val3"],
140
140
  [ns|prop^="val3"],
141
141
  [p^="val3"],
142
- [p=3],
143
142
  [p] {
144
143
  attributes: yes;
145
144
  }
@@ -16,9 +16,6 @@
16
16
  empty: '';
17
17
  semi-colon: ';';
18
18
  }
19
- #escaped {
20
- filter: DX.Transform.MS.BS.filter(opacity=50);
21
- }
22
19
  #one-line {
23
20
  image: url(http://tooks.com);
24
21
  }
@@ -114,3 +114,51 @@
114
114
  --semi-transparent-dark-background: #001e00ee;
115
115
  --semi-transparent-dark-background-2: rgba(0, 30, 0, 238); // invalid opacity will be capped
116
116
  }
117
+
118
+ .color-oklch-sub {
119
+ background: oklch(from #0000FF calc(l - 0.1) c h);
120
+ }
121
+
122
+ .color-oklch-add {
123
+ background: oklch(from #0000FF calc(l + 0.1) c h);
124
+ }
125
+
126
+ .color-oklch-mult {
127
+ background: oklch(from #0000FF calc(l * 0.1) c h);
128
+ }
129
+
130
+ .color-oklch-div {
131
+ background: oklch(from #0000FF calc(l / 2) c h);
132
+ }
133
+
134
+ .color-hsl-sub {
135
+ background: hsl(from #0000FF calc(h - 1) s l);
136
+ }
137
+
138
+ .color-hsl-add {
139
+ background: hsl(from #0000FF calc(h + 1) s l);
140
+ }
141
+
142
+ .color-hsl-mult {
143
+ background: hsl(from #0000FF calc(h * 1) s l);
144
+ }
145
+
146
+ .color-hsl-div {
147
+ background: hsl(from #0000FF calc(h / 2) s l);
148
+ }
149
+
150
+ .color-rgb-sub {
151
+ background: rgb(from #0000FF calc(r - 1) g b);
152
+ }
153
+
154
+ .color-rgb-add {
155
+ background: rgb(from #0000FF calc(r + 1) g b);
156
+ }
157
+
158
+ .color-rgb-mult {
159
+ background: rgb(from #0000FF calc(r * 1) g b);
160
+ }
161
+
162
+ .color-rgb-div {
163
+ background: rgb(from #0000FF calc(r / 2) g b);
164
+ }
@@ -98,5 +98,5 @@
98
98
  // line immediately followed
99
99
  /*by block */
100
100
  @string_w_comment: ~"/* // Not commented out // */";
101
- #output-block { comment: @string_w_comment; }
101
+ #output-block { --comment: @string_w_comment; }
102
102
  /*comment on last line*/
@@ -243,7 +243,9 @@
243
243
  }
244
244
 
245
245
  @media (hover: hover) {
246
- font-size: 1.75rem;
246
+ .foo {
247
+ font-size: 1.75rem;
248
+ }
247
249
  }
248
250
  }
249
251
 
@@ -263,10 +265,12 @@
263
265
  }
264
266
 
265
267
  @media (hover: hover) {
266
- font-size: 1.75rem;
268
+ .foo {
269
+ font-size: 1.75rem;
267
270
 
268
- @media not all and (hover: hover) {
269
- color: limegreen;
271
+ @media not all and (hover: hover) {
272
+ color: limegreen;
273
+ }
270
274
  }
271
275
 
272
276
  .media-3 {
@@ -282,10 +286,35 @@
282
286
 
283
287
  @container (min-width: 768px) {
284
288
  @media only screen and (min-width: 768px) {
285
- color: aliceblue;
289
+ .foo {
290
+ color: aliceblue;
291
+ }
286
292
  }
287
293
 
288
294
  .container-1 {
289
295
  color: purple;
290
296
  }
291
297
  }
298
+
299
+ #sticky {
300
+ position: sticky;
301
+ container-type: scroll-state;
302
+ }
303
+
304
+ @container scroll-state(stuck: top) {
305
+ #sticky-child {
306
+ font-size: 75%;
307
+ }
308
+ }
309
+
310
+ @container scroll-state(snapped: x) {
311
+ #sticky-child {
312
+ font-size: 75%;
313
+ }
314
+ }
315
+
316
+ @container scroll-state(scrollable: top) {
317
+ #sticky-child {
318
+ font-size: 75%;
319
+ }
320
+ }
@@ -1,3 +1,4 @@
1
+ @namespace foo url(http://www.example.com);
1
2
  .comma-delimited {
2
3
  text-shadow: -1px -1px 1px red, 6px 5px 5px yellow;
3
4
  -moz-box-shadow: 0pt 0pt 2px rgba(255, 255, 255, 0.4) inset,
@@ -19,11 +20,11 @@ p:not([class*="lead"]) {
19
20
  color: black;
20
21
  }
21
22
 
22
- input[type="text"].class#id[attr=32]:not(1) {
23
+ input[type="text"].class#id[attr=i32]:not(.one) {
23
24
  color: inherit;
24
25
  }
25
26
 
26
- div#id.class[a=1][b=2].class:not(1) {
27
+ div#id.class[a=one][b=two].class:not(.one) {
27
28
  color: inherit;
28
29
  }
29
30
 
@@ -96,7 +97,6 @@ p::before {
96
97
  @viewport {
97
98
  font-size: 10px;
98
99
  }
99
- @namespace foo url(http://www.example.com);
100
100
 
101
101
  foo|h1 { color: blue; }
102
102
  foo|* { color: yellow; }
@@ -110,7 +110,7 @@ h1 { color: green; }
110
110
  display: block;
111
111
  }
112
112
  }
113
- ::distributed(input::placeholder) {
113
+ :not(input::placeholder) {
114
114
  color: #b3b3b3;
115
115
  }
116
116
  .shadow > .dom,
@@ -118,8 +118,8 @@ body > .shadow {
118
118
  display: done;
119
119
  }
120
120
 
121
- :host(.sel .a),
122
- :host-context(.sel .b),
121
+ :host(.sel.a),
122
+ :host-context(.sel.b),
123
123
  .sel > .b,
124
124
  ::content .sel {
125
125
  type: shadow-dom;
@@ -41,4 +41,4 @@ textarea {
41
41
  font-family: 'helvetica neue','wenquanyi micro hei',\5FAE\8F6F\96C5\9ED1, \5B8B\4F53, sans-serif;
42
42
  }
43
43
 
44
- e('anything to unquote');
44
+ e('/* anything to unquote */');
@@ -38,7 +38,7 @@
38
38
  number-value: extract(12345678, 1);
39
39
  color-value: extract(blue, 1);
40
40
  rgba-value: extract(rgba(80, 160, 240, 0.67), 1);
41
- empty-value: extract(~'', 1);
41
+ --empty-value: extract(~'', 1);
42
42
 
43
43
  name-length: length(name);
44
44
  string-length: length("string");
@@ -263,7 +263,7 @@ html {
263
263
  b: if(not(true), 1, 2);
264
264
  @1: if(not(false), {c: 3}, {d: 4}); @1();
265
265
 
266
- e: if(not(true), 5);
266
+ --e: if(not(true), 5);
267
267
  @f: boolean(3 = 4);
268
268
  f: if(not(@f), 6);
269
269
  g: if(true, 3, 5);
@@ -0,0 +1,5 @@
1
+ .sub-rule {
2
+ ul {
3
+ color: white;
4
+ }
5
+ }
File without changes
@@ -0,0 +1,5 @@
1
+ .sub-rule {
2
+ ul {
3
+ color: white;
4
+ }
5
+ }
@@ -0,0 +1,5 @@
1
+ .sub-rule {
2
+ ul {
3
+ color: white;
4
+ }
5
+ }
@@ -0,0 +1,5 @@
1
+ .sub-rule {
2
+ ul {
3
+ color: white;
4
+ }
5
+ }
@@ -9,7 +9,7 @@
9
9
  return x})()`;
10
10
  }
11
11
  .scope {
12
- empty: `+function(){}`;
12
+ --empty: `+function(){}`;
13
13
  @foo: 42;
14
14
  var: `parseInt(this.foo.toJS())`;
15
15
  escaped: ~`2 + 5 + 'px'`;
@@ -0,0 +1,112 @@
1
+ .main {
2
+ @layer {
3
+ &::before {
4
+ color: #f00;
5
+ }
6
+ }
7
+ }
8
+
9
+ @layer legacy {
10
+ @import "./import/layer-import.less";
11
+ }
12
+
13
+ @import url("/import/layer-import-2.css") layer(foo);
14
+ @import url("/import/layer-import-3.css") layer(responsive) supports(display: flex) screen and (max-width: 768px);
15
+ @import url("/import/layer-import-4.css") layer(print) print;
16
+ @import url("/import/layer-import-4.css") layer(print) print, (max-width: 600px);
17
+ @import url("/import/layer-import-5.css") layer(features) supports(display: grid);
18
+
19
+ @layer-name: primevue;
20
+
21
+ @layer @layer-name {
22
+ .test {
23
+ foo: bar;
24
+ }
25
+ }
26
+
27
+ @layer reset, base, components, utilities;
28
+
29
+ @layer reset {
30
+
31
+ *,
32
+ *::before,
33
+ *::after {
34
+ box-sizing: border-box;
35
+ }
36
+ }
37
+
38
+ @layer base {
39
+ body {
40
+ margin: 0;
41
+ font-family: system-ui, sans-serif;
42
+
43
+ header {
44
+ background-color: #f0f0f0;
45
+ padding: 1rem;
46
+ }
47
+ }
48
+ }
49
+
50
+ @layer components {
51
+ .button {
52
+ display: inline-block;
53
+ padding: 0.5rem 1rem;
54
+ background-color: blue;
55
+ color: white;
56
+
57
+ &:hover {
58
+ background-color: darkblue;
59
+ }
60
+ }
61
+ }
62
+
63
+ @layer utilities {
64
+ .text-center {
65
+ text-align: center;
66
+ }
67
+
68
+ .responsive {
69
+ width: 100%;
70
+
71
+ @media (min-width: 768px) {
72
+ width: 50%;
73
+ }
74
+ }
75
+ }
76
+
77
+ .parent {
78
+ color: black;
79
+
80
+ .child {
81
+ color: red;
82
+ }
83
+
84
+ &:hover {
85
+ background: lightgray;
86
+ }
87
+ }
88
+
89
+ @layer foo.baz {
90
+ .bar {
91
+ font-weight: bold;
92
+ }
93
+ }
94
+
95
+ @layer framework {
96
+ @layer layout {
97
+ .container {
98
+ display: grid;
99
+ gap: 2rem;
100
+ }
101
+ }
102
+ }
103
+
104
+ @layer framework.layout {
105
+ main {
106
+ padding: 2rem;
107
+ }
108
+ p {
109
+ margin-block: 1rem;
110
+ color: #555;
111
+ }
112
+ }
@@ -264,12 +264,6 @@
264
264
  }
265
265
  }
266
266
 
267
- @media (example, all,), speech {
268
- body {
269
- background: green;
270
- }
271
- }
272
-
273
267
  @media (min-orientation:portrait) {
274
268
  body {
275
269
  background: green;
@@ -1,5 +1,5 @@
1
1
 
2
- @a0: 123;
2
+ @a0: \123;
3
3
  @a1: foo;
4
4
  @a2: ~".foo";
5
5
  @a4: ~"#foo";
@@ -25,7 +25,7 @@
25
25
  }
26
26
 
27
27
  mi-test-a {
28
- .123();
28
+ .\123();
29
29
  .foo();
30
30
  #foo();
31
31
  }
@@ -135,14 +135,13 @@ a {
135
135
  }
136
136
  @prop: p;
137
137
  [prop],
138
- [prop=10%],
138
+ [prop=ten-percent],
139
139
  [prop|="value@{num}"],
140
140
  [prop*="val@{num}"],
141
141
  [|prop~="val@{num}"],
142
142
  [*|prop$="val@{num}"],
143
143
  [ns|prop^="val@{num}"],
144
144
  [@{prop}^="val@{num}"],
145
- [@{prop}=@{num}],
146
145
  [@{prop}] {
147
146
  attributes: yes;
148
147
  }
@@ -16,9 +16,6 @@
16
16
  empty: '';
17
17
  semi-colon: ';';
18
18
  }
19
- #escaped {
20
- filter: ~"DX.Transform.MS.BS.filter(opacity=50)";
21
- }
22
19
  #one-line { image: url(http://tooks.com) }
23
20
  #crazy { image: url(http://), "}", url("http://}") }
24
21
  #interpolation {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "4.3.0",
6
+ "version": "4.4.2",
7
7
  "description": "Less files and CSS results",
8
8
  "author": "Alexis Sellier <self@cloudhead.net>",
9
9
  "contributors": [