less 3.10.3 → 3.11.3

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 (143) hide show
  1. package/.github/FUNDING.yml +12 -0
  2. package/CHANGELOG.md +509 -711
  3. package/CONTRIBUTING.md +2 -2
  4. package/Gruntfile.js +42 -212
  5. package/README.md +31 -3
  6. package/bin/lessc +10538 -13511
  7. package/dist/less.cjs.js +10078 -12936
  8. package/dist/less.js +10670 -13462
  9. package/dist/less.min.js +3 -3
  10. package/dist/less.min.js.map +1 -1
  11. package/lib/less/contexts.js +1 -1
  12. package/lib/less/environment/abstract-file-manager.js +1 -1
  13. package/lib/less/import-manager.js +7 -20
  14. package/lib/less/index.js +1 -1
  15. package/lib/less/less-error.js +22 -2
  16. package/lib/less/parse-tree.js +2 -6
  17. package/lib/less/parser/parser.js +10 -10
  18. package/lib/less/tree/debug-info.js +2 -1
  19. package/lib/less/tree/namespace-value.js +1 -2
  20. package/lib/less/visitors/visitor.js +10 -2
  21. package/lib/less-node/file-manager.js +19 -49
  22. package/lib/lessc.js +3 -22
  23. package/package.json +21 -16
  24. package/test/browser/common.js +11 -49
  25. package/test/browser/generator/benchmark.config.js +50 -0
  26. package/test/browser/generator/generate.js +78 -0
  27. package/test/browser/generator/runner.config.js +180 -0
  28. package/test/browser/generator/runner.js +2 -0
  29. package/test/browser/generator/template.js +83 -0
  30. package/test/browser/runner-browser-options.js +0 -6
  31. package/test/browser/runner-browser-spec.js +1 -1
  32. package/test/browser/runner-main-spec.js +1 -1
  33. package/test/browser/runner-modify-vars-spec.js +1 -1
  34. package/test/browser/runner-production-spec.js +1 -1
  35. package/test/css/calc.css +9 -0
  36. package/test/css/comments.css +1 -1
  37. package/test/css/css-3.css +5 -5
  38. package/test/css/css-guards.css +1 -1
  39. package/test/css/debug/linenumbers-all.css +5 -5
  40. package/test/css/debug/linenumbers-comments.css +5 -5
  41. package/test/css/debug/linenumbers-mediaquery.css +5 -5
  42. package/test/css/extend-chaining.css +3 -3
  43. package/test/css/extend-media.css +1 -1
  44. package/test/css/extend-nest.css +1 -1
  45. package/test/css/filemanagerPlugin/filemanager.css +1 -1
  46. package/test/css/functions-each.css +1 -1
  47. package/test/css/import-once.css +2 -2
  48. package/test/css/import-reference-issues.css +1 -1
  49. package/test/css/import-reference.css +6 -6
  50. package/test/css/import.css +1 -1
  51. package/test/css/javascript.css +1 -1
  52. package/test/css/legacy/legacy.css +1 -1
  53. package/test/css/math/parens-division/mixins-args.css +1 -1
  54. package/test/css/math/parens-division/parens.css +1 -1
  55. package/test/css/math/strict/mixins-args.css +1 -1
  56. package/test/css/math/strict/parens.css +1 -1
  57. package/test/css/math/strict-legacy/mixins-args.css +1 -1
  58. package/test/css/math/strict-legacy/parens.css +1 -1
  59. package/test/css/media.css +14 -14
  60. package/test/css/merge.css +10 -10
  61. package/test/css/mixins-guards.css +6 -6
  62. package/test/css/mixins.css +2 -2
  63. package/test/css/namespacing/namespacing-3.css +16 -1
  64. package/test/css/namespacing/namespacing-4.css +1 -1
  65. package/test/css/namespacing/namespacing-functions.css +6 -0
  66. package/test/css/no-strict-math/mixins-guards.css +1 -1
  67. package/test/css/permissive-parse.css +1 -1
  68. package/test/css/plugin.css +9 -9
  69. package/test/css/postProcessorPlugin/postProcessor.css +2 -2
  70. package/test/css/preProcessorPlugin/preProcessor.css +1 -1
  71. package/test/css/selectors.css +2 -2
  72. package/test/css/variables.css +1 -1
  73. package/test/css/visitorPlugin/visitor.css +1 -1
  74. package/test/index.js +6 -0
  75. package/test/less/calc.less +17 -1
  76. package/test/less/comments.less +1 -1
  77. package/test/less/css-3.less +5 -5
  78. package/test/less/css-guards.less +2 -2
  79. package/test/less/debug/import/test.less +2 -2
  80. package/test/less/debug/linenumbers.less +3 -3
  81. package/test/less/errors/color-func-invalid-color.less +1 -1
  82. package/test/less/errors/color-func-invalid-color.txt +1 -1
  83. package/test/less/errors/invalid-color-with-comment.less +1 -0
  84. package/test/less/errors/invalid-color-with-comment.txt +2 -0
  85. package/test/less/errors/plugin-1.txt +2 -2
  86. package/test/less/errors/plugin-2.txt +1 -2
  87. package/test/less/errors/plugin-3.txt +1 -2
  88. package/test/less/errors/property-ie5-hack.less +1 -1
  89. package/test/less/extend-chaining.less +3 -3
  90. package/test/less/extend-media.less +1 -1
  91. package/test/less/extend-nest.less +1 -1
  92. package/test/less/filemanagerPlugin/filemanager.less +1 -1
  93. package/test/less/functions-each.less +1 -1
  94. package/test/less/import/import-reference.less +1 -1
  95. package/test/less/import/import-test-f.less +1 -1
  96. package/test/less/import/json/index.json +11 -0
  97. package/test/less/import/json/index.less +1 -0
  98. package/test/less/import-reference-issues/global-scope-import.less +2 -2
  99. package/test/less/import-reference-issues/global-scope-nested.less +1 -1
  100. package/test/less/import-reference-issues.less +2 -2
  101. package/test/less/import-reference.less +1 -1
  102. package/test/less/javascript.less +1 -1
  103. package/test/less/legacy/legacy.less +1 -1
  104. package/test/less/math/parens-division/mixins-args.less +4 -4
  105. package/test/less/math/parens-division/parens.less +1 -1
  106. package/test/less/math/strict/mixins-args.less +4 -4
  107. package/test/less/math/strict/parens.less +1 -1
  108. package/test/less/math/strict-legacy/mixins-args.less +4 -4
  109. package/test/less/math/strict-legacy/parens.less +1 -1
  110. package/test/less/media.less +9 -9
  111. package/test/less/merge.less +10 -10
  112. package/test/less/mixins-guards.less +8 -8
  113. package/test/less/mixins-important.less +3 -3
  114. package/test/less/mixins.less +2 -2
  115. package/test/less/namespacing/namespacing-3.less +25 -2
  116. package/test/less/namespacing/namespacing-4.less +1 -1
  117. package/test/less/namespacing/namespacing-5.less +2 -2
  118. package/test/less/namespacing/namespacing-functions.less +26 -0
  119. package/test/less/no-strict-math/mixins-guards.less +2 -2
  120. package/test/less/permissive-parse.less +1 -1
  121. package/test/less/plugin.less +9 -9
  122. package/test/less/postProcessorPlugin/postProcessor.less +2 -2
  123. package/test/less/preProcessorPlugin/preProcessor.less +1 -1
  124. package/test/less/selectors.less +1 -1
  125. package/test/less/sourcemaps/imported.css +1 -1
  126. package/test/less/variables.less +1 -1
  127. package/test/less/visitorPlugin/visitor.less +1 -1
  128. package/test/less-test.js +45 -11
  129. package/test/less.js +11 -0
  130. package/test/sourcemaps/custom-props.json +1 -1
  131. package/.DS_Store +0 -0
  132. package/test/.DS_Store +0 -0
  133. package/test/browser/less.min.js +0 -11
  134. package/test/browser/less.min.js.map +0 -1
  135. package/test/browser/onload.js +0 -13
  136. package/test/browser/test-runner-template.tmpl +0 -105
  137. package/test/browser/vendor/boot.js +0 -148
  138. package/test/browser/vendor/jasmine-jsreporter.js +0 -391
  139. package/test/browser/vendor/promise.js +0 -2
  140. package/test/css/.DS_Store +0 -0
  141. package/test/css/math/.DS_Store +0 -0
  142. package/test/less/.DS_Store +0 -0
  143. package/test/less/math/.DS_Store +0 -0
@@ -19,7 +19,7 @@
19
19
  color: black;
20
20
  }
21
21
  .i.j:extend(.g all) {
22
- color: white;
22
+ color: inherit;
23
23
  }
24
24
  .k:extend(.i all) {}
25
25
 
@@ -65,7 +65,7 @@
65
65
  }
66
66
  .vb {
67
67
  &:extend(.va);
68
- color: white;
68
+ color: inherit;
69
69
  }
70
70
  .vc {
71
71
  &:extend(.vb);
@@ -78,7 +78,7 @@
78
78
  color: black;
79
79
  }
80
80
  .md {
81
- color: white;
81
+ color: inherit;
82
82
  }
83
83
  @media plasma {
84
84
  .me, .mf {
@@ -4,7 +4,7 @@
4
4
 
5
5
  @media tv {
6
6
  .ext1 .ext3 {
7
- color: white;
7
+ color: inherit;
8
8
  }
9
9
  .tv-lowres :extend(.ext1 all) {
10
10
  background: blue;
@@ -31,7 +31,7 @@
31
31
  .button {
32
32
  color: black;
33
33
  &:hover {
34
- color: white;
34
+ color: inherit;
35
35
  }
36
36
  }
37
37
  .submit {
@@ -1,4 +1,4 @@
1
1
  @import "test.test";
2
- .test {
2
+ .test-rule {
3
3
  color: @color;
4
4
  }
@@ -110,7 +110,7 @@ each(range(10px, 30px, 10px), .(@val, @index) {
110
110
  @color: red;
111
111
  }
112
112
  }
113
- .test {
113
+ .test-rule {
114
114
  each(primary secondary, .(@color-name) {
115
115
  @scheme: @color-schemes[@@color-name]; // e.g. @color-name = primary
116
116
  color: @scheme[@color];
@@ -65,7 +65,7 @@
65
65
  }
66
66
  //https://github.com/less/less.js/issues/1979
67
67
  .mixin-with-nested-selectors() {
68
- .test {
68
+ .test-rule {
69
69
  color: red;
70
70
  &:first-child {
71
71
  color: blue;
@@ -1,5 +1,5 @@
1
1
  @import "import-test-e";
2
2
 
3
- .test-f {
3
+ .test-rule-f {
4
4
  height: 10px;
5
5
  }
@@ -0,0 +1,11 @@
1
+ [
2
+ "{path}/import/import-test-a.less",
3
+ "{path}/import/import-test-b.less",
4
+ "{path}/import/deeper/url-import.less",
5
+ "{path}/import/urls.less",
6
+ "{path}/import/import-test-c.less",
7
+ "{path}/import/deeper/deeper-2/url-import.less",
8
+ "{path}/import/deeper/deeper-2/url-import-2.less",
9
+ "{path}/import/import-test-f.less",
10
+ "{path}/import/import-test-e.less"
11
+ ]
@@ -0,0 +1 @@
1
+ @import "../import-test-a";
@@ -7,7 +7,7 @@
7
7
 
8
8
  @import (reference) "global-scope-nested.less";
9
9
 
10
- .test-b {
10
+ .test-rule-b {
11
11
  background-color: green;
12
- &:extend(.test-a all);
12
+ &:extend(.test-rule-a all);
13
13
  }
@@ -1,3 +1,3 @@
1
- .test-a {
1
+ .test-rule-a {
2
2
  color: red;
3
3
  }
@@ -32,8 +32,8 @@ show-all-content {
32
32
 
33
33
  // #1851: Extend within (reference) imported files
34
34
  // test-b is in global-scope-import.less file
35
- .test-c {
36
- &:extend(.test-b all);
35
+ .test-rule-c {
36
+ &:extend(.test-rule-b all);
37
37
  }
38
38
 
39
39
  // #1968: When using an @import (reference), mixins that contain an & selector get added to the compiled output improperly
@@ -14,7 +14,7 @@
14
14
  extend: test;
15
15
  }
16
16
 
17
- .test-mediaq-import {
17
+ .test-rule-mediaq-import {
18
18
  .mixin-with-mediaq(340px);
19
19
  }
20
20
 
@@ -34,6 +34,6 @@
34
34
  2: ~`"@{arguments}"`; // rounded to integers
35
35
  3: @arguments; // OK
36
36
  }
37
- .test-tran {
37
+ .test-rule-tran {
38
38
  .transitions(opacity 0.3s ease-in 0.3s, max-height 0.6s linear, margin-bottom 0.4s linear;);
39
39
  }
@@ -1,5 +1,5 @@
1
1
  @media (-o-min-device-pixel-ratio: 2) {
2
- .test-math-and-units {
2
+ .test-rule-math-and-units {
3
3
  font: ignores 0/0 rules;
4
4
  test-division: 4 / 2 + 5em;
5
5
  simple: 1px + 1px;
@@ -181,7 +181,7 @@ body {
181
181
  defaults: 2px 2px 2px;
182
182
  }
183
183
 
184
- .test-mixin-default-arg {
184
+ .test-rule-mixin-default-arg {
185
185
  .mixin-default-arg();
186
186
  .mixin-default-arg(2px);
187
187
  }
@@ -205,14 +205,14 @@ body {
205
205
  .mixin-comma-default3(4,2,2,2);
206
206
  }
207
207
 
208
- .test-calling-one-arg-mixin(@a) {
208
+ .test-rule-calling-one-arg-mixin(@a) {
209
209
  }
210
210
 
211
- .test-calling-one-arg-mixin(@a, @b, @rest...) {
211
+ .test-rule-calling-one-arg-mixin(@a, @b, @rest...) {
212
212
  }
213
213
 
214
214
  div {
215
- .test-calling-one-arg-mixin(1);
215
+ .test-rule-calling-one-arg-mixin(1);
216
216
  }
217
217
 
218
218
  mixins-args-expand-op- {
@@ -41,6 +41,6 @@
41
41
  padding: (2px + 4px) 1em 2px 2;
42
42
  }
43
43
 
44
- .test-false-negatives {
44
+ .test-rule-false-negatives {
45
45
  a: ~"(";
46
46
  }
@@ -181,7 +181,7 @@ body {
181
181
  defaults: 2px 2px 2px;
182
182
  }
183
183
 
184
- .test-mixin-default-arg {
184
+ .test-rule-mixin-default-arg {
185
185
  .mixin-default-arg();
186
186
  .mixin-default-arg(2px);
187
187
  }
@@ -205,14 +205,14 @@ body {
205
205
  .mixin-comma-default3(4,2,2,2);
206
206
  }
207
207
 
208
- .test-calling-one-arg-mixin(@a) {
208
+ .test-rule-calling-one-arg-mixin(@a) {
209
209
  }
210
210
 
211
- .test-calling-one-arg-mixin(@a, @b, @rest...) {
211
+ .test-rule-calling-one-arg-mixin(@a, @b, @rest...) {
212
212
  }
213
213
 
214
214
  div {
215
- .test-calling-one-arg-mixin(1);
215
+ .test-rule-calling-one-arg-mixin(1);
216
216
  }
217
217
 
218
218
  mixins-args-expand-op- {
@@ -41,6 +41,6 @@
41
41
  padding: (2px + 4px) 1em 2px 2;
42
42
  }
43
43
 
44
- .test-false-negatives {
44
+ .test-rule-false-negatives {
45
45
  a: ~"(";
46
46
  }
@@ -180,7 +180,7 @@ body {
180
180
  defaults: 2px 2px 2px;
181
181
  }
182
182
 
183
- .test-mixin-default-arg {
183
+ .test-rule-mixin-default-arg {
184
184
  .mixin-default-arg();
185
185
  .mixin-default-arg(2px);
186
186
  }
@@ -204,14 +204,14 @@ body {
204
204
  .mixin-comma-default3(4,2,2,2);
205
205
  }
206
206
 
207
- .test-calling-one-arg-mixin(@a) {
207
+ .test-rule-calling-one-arg-mixin(@a) {
208
208
  }
209
209
 
210
- .test-calling-one-arg-mixin(@a, @b, @rest...) {
210
+ .test-rule-calling-one-arg-mixin(@a, @b, @rest...) {
211
211
  }
212
212
 
213
213
  div {
214
- .test-calling-one-arg-mixin(1);
214
+ .test-rule-calling-one-arg-mixin(1);
215
215
  }
216
216
 
217
217
  mixins-args-expand-op- {
@@ -45,6 +45,6 @@
45
45
  padding: (2px + 4px) 1em 2px 2;
46
46
  }
47
47
 
48
- .test-false-negatives {
48
+ .test-rule-false-negatives {
49
49
  a: ~"(";
50
50
  }
@@ -17,14 +17,14 @@
17
17
 
18
18
  @media screen {
19
19
  @base: 8;
20
- body { max-width: (@base * 60); }
20
+ .body { max-width: (@base * 60); }
21
21
  }
22
22
 
23
23
  @ratio_large: 16;
24
24
  @ratio_small: 9;
25
25
 
26
26
  @media all and (device-aspect-ratio: ~'@{ratio_large} / @{ratio_small}') {
27
- body { max-width: 800px; }
27
+ .body { max-width: 800px; }
28
28
  }
29
29
 
30
30
  @media all and (orientation:portrait) {
@@ -32,12 +32,12 @@
32
32
  }
33
33
 
34
34
  @media handheld and (min-width: @var), screen and (min-width: 20em) {
35
- body {
35
+ .body {
36
36
  max-width: 480px;
37
37
  }
38
38
  }
39
39
 
40
- body {
40
+ .body {
41
41
  @media print {
42
42
  padding: 20px;
43
43
 
@@ -78,7 +78,7 @@ body {
78
78
  }
79
79
  }
80
80
 
81
- body {
81
+ .body {
82
82
  @media a, b and c {
83
83
  width: 95%;
84
84
 
@@ -109,7 +109,7 @@ body {
109
109
  }
110
110
  @smartphone: ~"only screen and (max-width: 200px)";
111
111
  @media @smartphone {
112
- body {
112
+ .body {
113
113
  width: 480px;
114
114
  }
115
115
  }
@@ -191,13 +191,13 @@ body {
191
191
  }
192
192
  }
193
193
 
194
- body {
194
+ .body {
195
195
  .bg();
196
196
  }
197
197
 
198
198
  @bpMedium: 1000px;
199
199
  @media (max-width: @bpMedium) {
200
- body {
200
+ .body {
201
201
  .bg();
202
202
  background: blue;
203
203
  }
@@ -207,7 +207,7 @@ body {
207
207
  /* a comment */
208
208
 
209
209
  @media (max-width: 900px) {
210
- body { font-size: 11px; }
210
+ .body { font-size: 11px; }
211
211
  }
212
212
  }
213
213
 
@@ -20,40 +20,40 @@
20
20
  background+: url(data://img2.png);
21
21
  }
22
22
 
23
- .test1 {
23
+ .test-rule1 {
24
24
  // Can merge values
25
25
  .first-transform();
26
26
  .second-transform();
27
27
  }
28
- .test2 {
28
+ .test-rule2 {
29
29
  // Won't merge values without +: merge directive, for backwards compatibility with css
30
30
  .first-transform();
31
31
  .third-transform();
32
32
  }
33
- .test3 {
33
+ .test-rule3 {
34
34
  // Won't merge values from two sources with different properties
35
35
  .fourth-transform();
36
36
  .first-background();
37
37
  }
38
- .test4 {
38
+ .test-rule4 {
39
39
  .first-transform();
40
40
  .fifth-transform();
41
41
  }
42
- .test5 {
42
+ .test-rule5 {
43
43
  .first-transform();
44
44
  .second-transform() !important;
45
45
  }
46
- .test6 {
46
+ .test-rule6 {
47
47
  .second-transform();
48
48
  }
49
- .test7 {
49
+ .test-rule7 {
50
50
  // inherit !important from merged subrules
51
51
  .second-transform();
52
52
  .second-transform() !important;
53
53
  .second-transform();
54
54
  }
55
55
 
56
- .test-interleaved {
56
+ .test-rule-interleaved {
57
57
  transform+: t1;
58
58
  background+: b1;
59
59
  transform+: t2;
@@ -61,7 +61,7 @@
61
61
  transform+: t3;
62
62
  }
63
63
 
64
- .test-spaced {
64
+ .test-rule-spaced {
65
65
  transform+_: t1;
66
66
  background+_: b1;
67
67
  transform+_: t2;
@@ -69,7 +69,7 @@
69
69
  transform+_: t3;
70
70
  }
71
71
 
72
- .test-interleaved-with-spaced {
72
+ .test-rule-interleaved-with-spaced {
73
73
  transform+_: t1s;
74
74
  transform+: t2;
75
75
  background+: b1;
@@ -2,7 +2,7 @@
2
2
  // Stacking, functions..
3
3
 
4
4
  .light (@a) when (lightness(@a) > 50%) {
5
- color: white;
5
+ color: inherit;
6
6
  }
7
7
  .light (@a) when (lightness(@a) < 50%) {
8
8
  color: black;
@@ -63,18 +63,18 @@
63
63
  .default1 { .default }
64
64
 
65
65
  // true & false keywords
66
- .test (@a) when (@a) {
66
+ .test-rule (@a) when (@a) {
67
67
  content: "true.";
68
68
  }
69
- .test (@a) when not (@a) {
69
+ .test-rule (@a) when not (@a) {
70
70
  content: "false.";
71
71
  }
72
72
 
73
- .test1 { .test(true) }
74
- .test2 { .test(false) }
75
- .test3 { .test(1) }
76
- .test4 { .test(boo) }
77
- .test5 { .test("true") }
73
+ .test-rule1 { .test-rule(true) }
74
+ .test-rule2 { .test-rule(false) }
75
+ .test-rule3 { .test-rule(1) }
76
+ .test-rule4 { .test-rule(boo) }
77
+ .test-rule5 { .test-rule("true") }
78
78
 
79
79
  // Boolean expressions
80
80
 
@@ -35,7 +35,7 @@
35
35
  .when-calling-nested-with-param-issue-2394 {
36
36
  .size(10px) !important;
37
37
  }
38
- .testMixin-2421 () {
38
+ .test-ruleMixin-2421 () {
39
39
  .topCheck-2421 () {
40
40
  .nestedCheck-2421() {
41
41
  margin: 5px;
@@ -45,9 +45,9 @@
45
45
  .topCheck-2421();
46
46
  }
47
47
  .class1-2421 {
48
- .testMixin-2421() !important;
48
+ .test-ruleMixin-2421() !important;
49
49
  }
50
50
  .class2-2421 {
51
- .testMixin-2421();
51
+ .test-ruleMixin-2421();
52
52
  }
53
53
 
@@ -28,7 +28,7 @@
28
28
 
29
29
  #header {
30
30
  .milk {
31
- color: white;
31
+ color: inherit;
32
32
  .mixin;
33
33
  #theme > .mixin;
34
34
  }
@@ -119,7 +119,7 @@ h3 { .margin_between(15px, 5px); }
119
119
  .recursion() {
120
120
  color: black;
121
121
  }
122
- .test-rec {
122
+ .test-rule-rec {
123
123
  .recursion {
124
124
  .recursion();
125
125
  }
@@ -2,7 +2,7 @@
2
2
  @width: 400px;
3
3
  @colors: {
4
4
  toolbar-background: red;
5
- toolbar-foreground: white;
5
+ toolbar-foreground: inherit;
6
6
  }
7
7
  };
8
8
 
@@ -25,4 +25,27 @@
25
25
  background: @map[@colors][toolbar-background];
26
26
  color: @map[@colors][toolbar-foreground];
27
27
  }
28
- }
28
+ }
29
+
30
+ // !important after map usage
31
+ // https://github.com/less/less.js/issues/3430
32
+ @margins: {
33
+ zero: 0;
34
+ ten: 10px;
35
+ }
36
+ .cell {
37
+ margin: @margins[zero] @margins[ten]/2 !important;
38
+ }
39
+
40
+ .mixin(@color: black; @margin: 10px; @padding: 20px) {
41
+ color: @color;
42
+ margin: @margin;
43
+ padding: @padding;
44
+ width: @margins[zero] !important
45
+ }
46
+ .class1 {
47
+ .mixin(@margin: 20px; @color: #33acfe) !important;
48
+ }
49
+ .class2 {
50
+ .mixin(#efca44; @padding: 40px 10px);
51
+ }
@@ -12,7 +12,7 @@
12
12
  .core() {
13
13
  .colors() {
14
14
  primary: blue;
15
- foreground: white;
15
+ foreground: inherit;
16
16
  }
17
17
  }
18
18
  }
@@ -8,7 +8,7 @@
8
8
  primary: black;
9
9
  secondary: grey;
10
10
  }
11
- .test() {
11
+ .test-rule() {
12
12
  val: output;
13
13
  }
14
14
  }
@@ -16,7 +16,7 @@
16
16
  .my-navbar {
17
17
  #theme.dark.navbar();
18
18
  background: .colors[primary];
19
- .test();
19
+ .test-rule();
20
20
  }
21
21
 
22
22
  .another-navbar {
@@ -8,4 +8,30 @@
8
8
 
9
9
  @return: {
10
10
  single: val;
11
+ }
12
+
13
+ // Issue #3405
14
+ #lookup {
15
+ @prop: test;
16
+ }
17
+
18
+ .mix (@var) {
19
+ width: @var;
20
+ }
21
+
22
+ .bar {
23
+ .mix(#lookup[@prop]);
24
+ }
25
+
26
+ // Issue #3406
27
+ .mix2 (@n) {
28
+ value: @n;
29
+ }
30
+ #lookup2 {
31
+ @var: .mix2(lookup);
32
+ }
33
+ .example {
34
+ // #lookup[@var](); -- fails, need the following alias
35
+ @dr: #lookup2[@var];
36
+ @dr();
11
37
  }
@@ -1,8 +1,8 @@
1
1
  // https://github.com/less/less.js/issues/2798
2
- .test-2798 when ((8+4) < 13) {
2
+ .test-rule-2798 when ((8+4) < 13) {
3
3
  regression: fixed;
4
4
  }
5
- .test-2798 when ((8+6) < 13) {
5
+ .test-rule-2798 when ((8+6) < 13) {
6
6
  regression: should not be visible;
7
7
  }
8
8
  .conditions-parser-1 when (8+4 < 13) {
@@ -44,7 +44,7 @@
44
44
  }
45
45
  }
46
46
  // @todo - fix comment absorption after property
47
- .test-comment {
47
+ .test-rule-comment {
48
48
  --value: a/* { ; } */;
49
49
  --comment-within: ( /* okay?; comment; */ );
50
50
  }
@@ -57,7 +57,7 @@
57
57
 
58
58
  // `test-global` function should propagate into directive scope
59
59
  @media screen {
60
- .test {
60
+ .test-rule {
61
61
  result : test-global();
62
62
  }
63
63
  }
@@ -68,13 +68,13 @@
68
68
  // `test-global` function should propagate into nested directive scopes
69
69
  @media screen and (min-width:100px) {
70
70
  @media (max-width:400px) {
71
- .test {
71
+ .test-rule {
72
72
  result : test-global();
73
73
  }
74
74
  }
75
75
  }
76
76
 
77
- .test {
77
+ .test-rule {
78
78
  @media screen {
79
79
  @plugin "./plugin/plugin-local";
80
80
  result : test-local();
@@ -86,29 +86,29 @@
86
86
  .root {
87
87
  @ruleset2();
88
88
  }
89
- .test-empty {
89
+ .test-rule-empty {
90
90
  val1: foo;
91
91
  test-collapse();
92
92
  val2: foo;
93
93
  }
94
- .test-simple {
94
+ .test-rule-simple {
95
95
  @plugin "./plugin/plugin-simple";
96
96
  value: pi-anon();
97
97
  value: (pi() * 2);
98
98
  }
99
- .test-conflicts {
99
+ .test-rule-conflicts {
100
100
  @plugin "./plugin/plugin-scope1";
101
101
  value: foo();
102
102
  }
103
- .test-conflicts {
103
+ .test-rule-conflicts {
104
104
  @plugin "./plugin/plugin-scope2";
105
105
  value: foo();
106
106
  }
107
- .test-conflicts {
107
+ .test-rule-conflicts {
108
108
  @plugin "./plugin/plugin-scope1";
109
109
  value: foo();
110
110
  }
111
- .test-collection {
111
+ .test-rule-collection {
112
112
  @plugin "./plugin/plugin-collection";
113
113
  @var: 32;
114
114
  store(@var);
@@ -1,4 +1,4 @@
1
- @color: white;
2
- .test {
1
+ @color: inherit;
2
+ .test-rule {
3
3
  color: @color;
4
4
  }
@@ -1,3 +1,3 @@
1
- .test {
1
+ .test-rule {
2
2
  color: @color;
3
3
  }