@less/test-data 3.12.2 → 4.2.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.
Files changed (108) hide show
  1. package/css/_main/colors.css +6 -6
  2. package/css/_main/colors2.css +6 -0
  3. package/css/_main/container.css +148 -0
  4. package/css/_main/css-3.css +5 -10
  5. package/css/_main/css-guards.css +1 -1
  6. package/css/_main/detached-rulesets.css +4 -4
  7. package/css/_main/extend-chaining.css +2 -2
  8. package/css/_main/extend-media.css +2 -2
  9. package/css/_main/functions.css +14 -0
  10. package/css/_main/impor.css +1 -0
  11. package/css/_main/import-remote.css +1 -1
  12. package/css/_main/javascript.css +3 -3
  13. package/css/_main/media.css +53 -5
  14. package/css/_main/mixin-noparens.css +7 -0
  15. package/css/_main/mixins-guards-default-func.css +4 -4
  16. package/css/_main/permissive-parse.css +9 -0
  17. package/css/_main/plugi.css +1 -0
  18. package/css/_main/selectors.css +19 -4
  19. package/css/math/parens-division/mixins-args.css +0 -5
  20. package/css/math/parens-division/parens.css +5 -0
  21. package/css/math/strict/mixins-args.css +0 -5
  22. package/css/math/strict/parens.css +5 -0
  23. package/css/namespacing/namespacing-8.css +10 -0
  24. package/errors/eval/color-func-invalid-color-2.txt +1 -1
  25. package/errors/eval/color-func-invalid-color.txt +1 -1
  26. package/errors/eval/css-guard-default-func.txt +1 -1
  27. package/errors/eval/functions-1.txt +1 -1
  28. package/errors/eval/functions-4-call.txt +1 -1
  29. package/errors/eval/mixin-not-visible-in-scope-1.less +1 -1
  30. package/errors/eval/mixin-not-visible-in-scope-1.txt +1 -1
  31. package/errors/eval/percentage-non-number-argument.txt +1 -1
  32. package/errors/eval/recursive-variable.txt +1 -1
  33. package/errors/eval/root-func-undefined-1.txt +1 -1
  34. package/errors/eval/root-func-undefined-2.txt +1 -1
  35. package/errors/eval/svg-gradient1.txt +1 -1
  36. package/errors/eval/svg-gradient2.txt +1 -1
  37. package/errors/eval/svg-gradient3.txt +1 -1
  38. package/errors/eval/svg-gradient4.txt +1 -1
  39. package/errors/eval/svg-gradient5.txt +1 -1
  40. package/errors/eval/svg-gradient6.txt +1 -1
  41. package/errors/eval/unit-function.txt +1 -1
  42. package/less/_main/colors.less +6 -6
  43. package/less/_main/colors2.less +6 -0
  44. package/less/_main/container.less +180 -0
  45. package/less/_main/css-3.less +5 -6
  46. package/less/_main/css-escapes.less +1 -1
  47. package/less/_main/css-guards.less +1 -1
  48. package/less/_main/detached-rulesets.less +4 -4
  49. package/less/_main/directives-bubling.less +1 -1
  50. package/less/_main/extend-chaining.less +2 -2
  51. package/less/_main/extend-media.less +2 -2
  52. package/less/_main/extract-and-length.less +2 -2
  53. package/less/_main/functions.less +23 -4
  54. package/less/_main/impor.less +5 -0
  55. package/less/_main/import/import-and-relative-paths-test.less +2 -2
  56. package/less/_main/import-reference-issues/comments-2991.less +25 -0
  57. package/less/_main/import-reference-issues.less +3 -0
  58. package/less/_main/import-remote.less +2 -2
  59. package/less/_main/import.less +1 -1
  60. package/less/_main/javascript.less +3 -3
  61. package/less/_main/media.less +64 -6
  62. package/less/_main/mixin-noparens.less +9 -0
  63. package/less/_main/mixins-closure.less +3 -3
  64. package/less/_main/mixins-guards-default-func.less +5 -5
  65. package/less/_main/mixins-guards.less +2 -2
  66. package/less/_main/mixins-important.less +1 -1
  67. package/less/_main/mixins-interpolated.less +7 -7
  68. package/less/_main/mixins.less +17 -17
  69. package/less/_main/permissive-parse.less +6 -1
  70. package/less/_main/plugi.less +5 -0
  71. package/less/_main/scope.less +2 -2
  72. package/less/_main/selectors.less +23 -5
  73. package/less/_main/urls.less +2 -2
  74. package/less/import-redirect/import-redirect.less +3 -0
  75. package/less/js-type-errors/js-type-error-2.txt +4 -0
  76. package/less/js-type-errors/js-type-error.less +3 -0
  77. package/less/js-type-errors/js-type-error.txt +4 -0
  78. package/less/math/parens-division/media-math.less +1 -1
  79. package/less/math/parens-division/mixins-args.less +3 -7
  80. package/less/math/parens-division/parens.less +6 -0
  81. package/less/math/strict/mixins-args.less +3 -7
  82. package/less/math/strict/parens.less +6 -0
  83. package/less/namespacing/namespacing-3.less +1 -1
  84. package/less/namespacing/namespacing-4.less +1 -1
  85. package/less/namespacing/namespacing-8.less +31 -0
  86. package/less/sourcemaps-variable-selector/basic.less +5 -0
  87. package/less/sourcemaps-variable-selector/vars.less +3 -0
  88. package/package.json +2 -2
  89. package/css/3rd-party/uikit.css +0 -8955
  90. package/css/math/strict-legacy/css.css +0 -95
  91. package/css/math/strict-legacy/media-math.css +0 -10
  92. package/css/math/strict-legacy/mixins-args.css +0 -163
  93. package/css/math/strict-legacy/parens.css +0 -40
  94. package/errors/eval/javascript-error.less +0 -3
  95. package/errors/eval/javascript-error.txt +0 -4
  96. package/less/3rd-party/uikit.less +0 -1
  97. package/less/math/strict-legacy/css.less +0 -108
  98. package/less/math/strict-legacy/media-math.less +0 -9
  99. package/less/math/strict-legacy/mixins-args.less +0 -263
  100. package/less/math/strict-legacy/parens.less +0 -50
  101. /package/css/{no-strict-math → math/always}/mixins-guards.css +0 -0
  102. /package/css/{no-strict-math → math/always}/no-sm-operations.css +0 -0
  103. /package/css/{legacy/legacy.css → units/no-strict/no-strict.css} +0 -0
  104. /package/css/{strict-units → units/strict}/strict-units.css +0 -0
  105. /package/less/{no-strict-math → math/always}/mixins-guards.less +0 -0
  106. /package/less/{no-strict-math → math/always}/no-sm-operations.less +0 -0
  107. /package/less/{legacy/legacy.less → units/no-strict/no-strict.less} +0 -0
  108. /package/less/{strict-units → units/strict}/strict-units.less +0 -0
@@ -158,7 +158,7 @@ guard-default-multi-4 {
158
158
  .m(2);
159
159
  }
160
160
 
161
- guard-default-not-ambiguos-2 {
161
+ guard-default-not-ambiguous-2 {
162
162
  .m(@x) {case: 1}
163
163
  .m(@x) when (default()) {default: @x}
164
164
  .m(@x) when not(default()) {not-default: @x}
@@ -166,7 +166,7 @@ guard-default-not-ambiguos-2 {
166
166
  .m(2);
167
167
  }
168
168
 
169
- guard-default-not-ambiguos-3 {
169
+ guard-default-not-ambiguous-3 {
170
170
  .m(@x) {case: 1}
171
171
  .m(@x) when not(default()) {not-default-1: @x}
172
172
  .m(@x) when not(default()) {not-default-2: @x}
@@ -177,9 +177,9 @@ guard-default-not-ambiguos-3 {
177
177
  // default & scope
178
178
 
179
179
  guard-default-scopes {
180
- .s1() {.m(@v) {1: no condition}}
181
- .s2() {.m(@v) when (@v) {2: when true}}
182
- .s3() {.m(@v) when (default()) {3: when default}}
180
+ .s1() {.m(@v) {one: no condition}}
181
+ .s2() {.m(@v) when (@v) {two: when true}}
182
+ .s3() {.m(@v) when (default()) {three: when default}}
183
183
 
184
184
  &-3 {
185
185
  .s2();
@@ -60,7 +60,7 @@
60
60
  .default (@a: inherit) when (@a = inherit) {
61
61
  content: default;
62
62
  }
63
- .default1 { .default }
63
+ .default1 { .default() }
64
64
 
65
65
  // true & false keywords
66
66
  .test-rule (@a) when (@a) {
@@ -94,7 +94,7 @@
94
94
  .bool () when not (true) and not (true) { content: not true and not true }
95
95
  .bool () when not (false) and (false), not (false) { content: not false and false, not false }
96
96
 
97
- .bool1 { .bool }
97
+ .bool1 { .bool() }
98
98
 
99
99
  .equality-unit-test(@num) when (@num = 1%) {
100
100
  test: fail;
@@ -20,7 +20,7 @@
20
20
  .mixin(3);
21
21
  .mixin(4) !important;
22
22
  .mixin(5);
23
- .mixin !important;
23
+ .mixin() !important;
24
24
  .mixin(9);
25
25
  }
26
26
  .size(@aaa: auto) {
@@ -25,9 +25,9 @@
25
25
  }
26
26
 
27
27
  mi-test-a {
28
- .123;
29
- .foo;
30
- #foo;
28
+ .123();
29
+ .foo();
30
+ #foo();
31
31
  }
32
32
 
33
33
  .b .bb {
@@ -39,7 +39,7 @@ mi-test-a {
39
39
  }
40
40
 
41
41
  mi-test-b {
42
- .b.bb.foo-xxx.yyy-foo#foo.foo.bbb;
42
+ .b.bb.foo-xxx.yyy-foo#foo.foo.bbb();
43
43
  }
44
44
 
45
45
  @c1: @a1;
@@ -55,9 +55,9 @@ mi-test-b {
55
55
  }
56
56
 
57
57
  mi-test-c {
58
- &-1 {#foo-foo;}
59
- &-2 {#foo-foo > .bar;}
60
- &-3 {#foo-foo > .bar.baz;}
58
+ &-1 {#foo-foo();}
59
+ &-2 {#foo-foo > .bar();}
60
+ &-3 {#foo-foo > .bar.baz();}
61
61
  }
62
62
 
63
63
  .Person(@name, @gender_) {
@@ -21,30 +21,30 @@
21
21
  }
22
22
  #container {
23
23
  color: black;
24
- .mixin;
25
- .mixout;
26
- #theme > .mixin;
24
+ .mixin();
25
+ .mixout();
26
+ #theme > .mixin();
27
27
  }
28
28
 
29
29
  #header {
30
30
  .milk {
31
31
  color: inherit;
32
- .mixin;
33
- #theme > .mixin;
32
+ .mixin();
33
+ #theme > .mixin();
34
34
  }
35
35
  #cookie {
36
36
  .chips {
37
- #namespace .borders;
37
+ #namespace .borders();
38
38
  .calories {
39
- #container;
39
+ #container();
40
40
  }
41
41
  }
42
- .borders;
42
+ .borders();
43
43
  }
44
44
  }
45
- .secure-zone { #namespace .biohazard .man; }
45
+ .secure-zone { #namespace .biohazard .man(); }
46
46
  .direct {
47
- #namespace > .borders;
47
+ #namespace > .borders();
48
48
  }
49
49
 
50
50
  .bo, .bar {
@@ -71,11 +71,11 @@
71
71
  }
72
72
  }
73
73
  .extended {
74
- .bo;
75
- .jo.ki;
76
- .amp.support;
77
- .amp.support.higher;
78
- .amp.support.deeper;
74
+ .bo();
75
+ .jo.ki();
76
+ .amp.support();
77
+ .amp.support.higher();
78
+ .amp.support.deeper();
79
79
  }
80
80
  .do .re .mi .fa {
81
81
  .sol .la {
@@ -85,10 +85,10 @@
85
85
  }
86
86
  }
87
87
  .mutli-selector-parents {
88
- .do.re.mi.fa.sol.la.si;
88
+ .do.re.mi.fa.sol.la.si();
89
89
  }
90
90
  .foo .bar {
91
- .bar;
91
+ .bar();
92
92
  }
93
93
  .has_parents() {
94
94
  & .underParents {
@@ -47,4 +47,9 @@
47
47
  .test-rule-comment {
48
48
  --value: a/* { ; } */;
49
49
  --comment-within: ( /* okay?; comment; */ );
50
- }
50
+ }
51
+ .test-no-trailing-semicolon {
52
+ --value: foo
53
+ }
54
+ .test-no-trailing-semicolon2 {--value: foo}
55
+ .test-no-trailing-semicolon3 { --value: foo }
@@ -0,0 +1,5 @@
1
+ // https://github.com/less/less.js/issues/3660
2
+ // const dir = parserInput.$re(/^@plugin?\s+/);
3
+ // correct regexp is /^@plugin\s+/
4
+ // so follow code will change nothing, parse result is same with raw less code
5
+ @plugi "plugi-typo-dont-parse-as-@plugin";
@@ -9,7 +9,7 @@
9
9
  @mix: blue;
10
10
  .tiny-scope {
11
11
  color: @mix; // #989
12
- .mixin;
12
+ .mixin();
13
13
  }
14
14
 
15
15
  .scope1 {
@@ -57,7 +57,7 @@
57
57
  }
58
58
  .importRuleset();
59
59
  .testImported {
60
- .imported;
60
+ .imported();
61
61
  }
62
62
 
63
63
  @parameterDefault: 'top level';
@@ -132,20 +132,38 @@ a {
132
132
  &:nth-child(odd):not(:nth-child(3)) {
133
133
  color: #ff0000;
134
134
  }
135
- }
135
+ }
136
+ @prop: p;
136
137
  [prop],
137
138
  [prop=10%],
138
- [prop="value@{num}"],
139
+ [prop|="value@{num}"],
139
140
  [prop*="val@{num}"],
140
141
  [|prop~="val@{num}"],
141
142
  [*|prop$="val@{num}"],
142
143
  [ns|prop^="val@{num}"],
143
- [@{num}^="val@{num}"],
144
- [@{num}=@{num}],
145
- [@{num}] {
144
+ [@{prop}^="val@{num}"],
145
+ [@{prop}=@{num}],
146
+ [@{prop}] {
146
147
  attributes: yes;
147
148
  }
148
149
 
150
+ /**
151
+ * https://www.w3.org/TR/selectors-4/#attribute-case
152
+ */
153
+ @pattern: less;
154
+ a[href*="insensitive" i] {
155
+ color: cyan;
156
+ }
157
+ a[href*="cAsE" s] {
158
+ color: pink;
159
+ }
160
+ a[href*="@{pattern}" I] {
161
+ background-color: silver;
162
+ }
163
+ a[href*="@{pattern}" S] {
164
+ background-color: red;
165
+ }
166
+
149
167
  /*
150
168
  Large comment means chunk will be emitted after } which means chunk will begin with whitespace...
151
169
  blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank
@@ -39,8 +39,8 @@
39
39
  @import "import/import-and-relative-paths-test";
40
40
 
41
41
  #relative-url-import {
42
- .unquoted-relative-path-bg;
43
- .quoted-relative-path-border-image;
42
+ .unquoted-relative-path-bg();
43
+ .quoted-relative-path-border-image();
44
44
  }
45
45
 
46
46
  #data-uri {
@@ -0,0 +1,3 @@
1
+ @import "https://example.com/redirect.less";
2
+
3
+ h1 { color: red; }
@@ -0,0 +1,4 @@
1
+ SyntaxError: JavaScript evaluation error: 'TypeError: Cannot read properties of undefined (reading 'toJS')' in {path}js-type-error.less on line 2, column 8:
2
+ 1 .scope {
3
+ 2 var: `this.foo.toJS`;
4
+ 3 }
@@ -0,0 +1,3 @@
1
+ .scope {
2
+ var: `this.foo.toJS`;
3
+ }
@@ -0,0 +1,4 @@
1
+ SyntaxError: JavaScript evaluation error: 'TypeError: Cannot read property 'toJS' of undefined' in {path}js-type-error.less on line 2, column 8:
2
+ 1 .scope {
3
+ 2 var: `this.foo.toJS`;
4
+ 3 }
@@ -1,4 +1,4 @@
1
- @var: 16;
1
+ @var: 10 + 6;
2
2
 
3
3
  @media (min-width: @var + 1) {
4
4
  .foo { bar: 1; }
@@ -19,7 +19,7 @@
19
19
  }
20
20
 
21
21
  #hidden {
22
- .hidden;
22
+ .hidden();
23
23
  }
24
24
 
25
25
  #hidden1 {
@@ -36,10 +36,6 @@
36
36
  .mixin(3px);
37
37
  }
38
38
 
39
- .no-parens {
40
- .mixin;
41
- }
42
-
43
39
  .no-args {
44
40
  .mixin();
45
41
  }
@@ -98,7 +94,7 @@ body {
98
94
  @var: 10px;
99
95
  width: @var;
100
96
  }
101
- #var-inside { .var-inside; }
97
+ #var-inside { .var-inside(); }
102
98
 
103
99
  .mixin-arguments (@width: 0px, ...) {
104
100
  border: @arguments;
@@ -112,7 +108,7 @@ body {
112
108
  .mixin-arguments();
113
109
  }
114
110
  .arguments3 {
115
- .mixin-arguments;
111
+ .mixin-arguments();
116
112
  }
117
113
 
118
114
  .mixin-arguments2 (@width, @rest...) {
@@ -1,3 +1,9 @@
1
+ .parens-issues-3616 {
2
+ bar: if(false, 666, 888 / 444);
3
+ bar2: if(false, 666, (666 / 333));
4
+ bar3: if(false, 666, ((444 / 222)));
5
+ }
6
+
1
7
  .parens {
2
8
  @var: 1px;
3
9
  border: (@var * 2) solid black;
@@ -19,7 +19,7 @@
19
19
  }
20
20
 
21
21
  #hidden {
22
- .hidden;
22
+ .hidden();
23
23
  }
24
24
 
25
25
  #hidden1 {
@@ -36,10 +36,6 @@
36
36
  .mixin(3px);
37
37
  }
38
38
 
39
- .no-parens {
40
- .mixin;
41
- }
42
-
43
39
  .no-args {
44
40
  .mixin();
45
41
  }
@@ -98,7 +94,7 @@ body {
98
94
  @var: 10px;
99
95
  width: @var;
100
96
  }
101
- #var-inside { .var-inside; }
97
+ #var-inside { .var-inside(); }
102
98
 
103
99
  .mixin-arguments (@width: 0px, ...) {
104
100
  border: @arguments;
@@ -112,7 +108,7 @@ body {
112
108
  .mixin-arguments();
113
109
  }
114
110
  .arguments3 {
115
- .mixin-arguments;
111
+ .mixin-arguments();
116
112
  }
117
113
 
118
114
  .mixin-arguments2 (@width, @rest...) {
@@ -1,3 +1,9 @@
1
+ .parens-issues-3616 {
2
+ bar: if(false, 666, 888 / 444);
3
+ bar2: if(false, 666, (666 / 333));
4
+ bar3: if(false, 666, ((444 / 222)));
5
+ }
6
+
1
7
  .parens {
2
8
  @var: 1px;
3
9
  border: (@var * 2) solid black;
@@ -34,7 +34,7 @@
34
34
  ten: 10px;
35
35
  }
36
36
  .cell {
37
- margin: @margins[zero] @margins[ten]/2 !important;
37
+ margin: @margins[zero] (@margins[ten]/2) !important;
38
38
  }
39
39
 
40
40
  .mixin(@color: black; @margin: 10px; @padding: 20px) {
@@ -26,7 +26,7 @@
26
26
  }
27
27
 
28
28
  .foo {
29
- .colors() { #library.core.colors; }
29
+ .colors() { #library.core.colors(); }
30
30
  width: .alias[@a];
31
31
  background: .colors[primary];
32
32
  color: .colors[foreground];
@@ -0,0 +1,31 @@
1
+ // see: https://github.com/less/less.js/issues/3368
2
+ @vars: {
3
+ background-color: black;
4
+ color: contrast($background-color, #000, #fff);
5
+ }
6
+
7
+ :root {
8
+ each(@vars, {
9
+ --@{key}: @value;
10
+ });
11
+ }
12
+
13
+ div {
14
+ display: inline-block;
15
+ padding: 1rem;
16
+ background-color: var(--background-color);
17
+ color: var(--color);
18
+ }
19
+
20
+ // see: https://github.com/less/less.js/issues/3339
21
+ // still fails - move to 4.0
22
+ // @components: {
23
+ // columns: true;
24
+ // ratios: false;
25
+ // };
26
+
27
+ // each(@components, {
28
+ // & when (@value = true) {
29
+ // @import (optional) "components/@{key}.less";
30
+ // }
31
+ // });
@@ -0,0 +1,5 @@
1
+ @import (reference) "./vars.less";
2
+
3
+ .@{hello}-class {
4
+ font-size: @font-size;
5
+ }
@@ -0,0 +1,3 @@
1
+ @foo: bar;
2
+ @font-size: 12px;
3
+ @hello: world;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.12.2",
6
+ "version": "4.2.0",
7
7
  "description": "Less files and CSS results",
8
8
  "author": {
9
9
  "name": "Alexis Sellier",
@@ -13,5 +13,5 @@
13
13
  "The Core Less Team"
14
14
  ],
15
15
  "license": "Apache-2.0",
16
- "gitHead": "185762a999519708fd914c9fad99b61720f34281"
16
+ "gitHead": "1df9072ee9ebdadc791bf35dfb1dbc3ef9f1948f"
17
17
  }