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
@@ -1,8 +1,8 @@
1
1
  input[type="text"].class#id[attr=32]:not(1) {
2
- color: white;
2
+ color: inherit;
3
3
  }
4
4
  div#id.class[a=1][b=2].class:not(1) {
5
- color: white;
5
+ color: inherit;
6
6
  }
7
7
  @media print {
8
8
  .class {
@@ -65,19 +65,19 @@ div#id.class[a=1][b=2].class:not(1) {
65
65
  .visible {
66
66
  extend: test;
67
67
  }
68
- .test-mediaq-import {
68
+ .test-rule-mediaq-import {
69
69
  color: green;
70
70
  test: 340px;
71
71
  }
72
72
  @media (max-size: 450px) {
73
- .test-mediaq-import {
73
+ .test-rule-mediaq-import {
74
74
  color: red;
75
75
  }
76
76
  }
77
- .test {
77
+ .test-rule {
78
78
  color: red;
79
79
  }
80
- .test:first-child {
80
+ .test-rule:first-child {
81
81
  color: blue;
82
82
  }
83
83
  @keyframes some-name {
@@ -20,7 +20,7 @@
20
20
  height: 10px;
21
21
  color: red;
22
22
  }
23
- .test-f {
23
+ .test-rule-f {
24
24
  height: 10px;
25
25
  }
26
26
  .deep-import-url {
@@ -22,7 +22,7 @@
22
22
  ary: "1, 2, 3";
23
23
  ary1: "1, 2, 3";
24
24
  }
25
- .test-tran {
25
+ .test-rule-tran {
26
26
  1: opacity 0.3s ease-in 0.3s, max-height 0.6s linear, margin-bottom 0.4s linear;
27
27
  2: [opacity 0.3s ease-in 0.3s, max-height 0.6s linear, margin-bottom 0.4s linear];
28
28
  3: opacity 0.3s ease-in 0.3s, max-height 0.6s linear, margin-bottom 0.4s linear;
@@ -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: 7em;
5
5
  simple: 2px;
@@ -104,7 +104,7 @@ body {
104
104
  four: a, 11, 12, 13;
105
105
  four: a, 21, 22, 23;
106
106
  }
107
- .test-mixin-default-arg {
107
+ .test-rule-mixin-default-arg {
108
108
  defaults: 1px 1px 1px;
109
109
  defaults: 2px 2px 2px;
110
110
  }
@@ -32,6 +32,6 @@
32
32
  margin: 2px 4em 1 5pc;
33
33
  padding: 6px 1em 2px 2;
34
34
  }
35
- .test-false-negatives {
35
+ .test-rule-false-negatives {
36
36
  a: (;
37
37
  }
@@ -104,7 +104,7 @@ body {
104
104
  four: a, 11, 12, 13;
105
105
  four: a, 21, 22, 23;
106
106
  }
107
- .test-mixin-default-arg {
107
+ .test-rule-mixin-default-arg {
108
108
  defaults: 1px 1px 1px;
109
109
  defaults: 2px 2px 2px;
110
110
  }
@@ -32,6 +32,6 @@
32
32
  margin: 2px 4em 1 5pc;
33
33
  padding: 6px 1em 2px 2;
34
34
  }
35
- .test-false-negatives {
35
+ .test-rule-false-negatives {
36
36
  a: (;
37
37
  }
@@ -98,7 +98,7 @@ body {
98
98
  four: a, 11, 12, 13;
99
99
  four: a, 21, 22, 23;
100
100
  }
101
- .test-mixin-default-arg {
101
+ .test-rule-mixin-default-arg {
102
102
  defaults: 1px 1px 1px;
103
103
  defaults: 2px 2px 2px;
104
104
  }
@@ -35,6 +35,6 @@
35
35
  margin: 2px 4em 1 5pc;
36
36
  padding: 6px 1em 2px 2;
37
37
  }
38
- .test-false-negatives {
38
+ .test-rule-false-negatives {
39
39
  a: (;
40
40
  }
@@ -11,12 +11,12 @@
11
11
  }
12
12
  }
13
13
  @media screen {
14
- body {
14
+ .body {
15
15
  max-width: 480;
16
16
  }
17
17
  }
18
18
  @media all and (device-aspect-ratio: 16 / 9) {
19
- body {
19
+ .body {
20
20
  max-width: 800px;
21
21
  }
22
22
  }
@@ -26,20 +26,20 @@
26
26
  }
27
27
  }
28
28
  @media handheld and (min-width: 42), screen and (min-width: 20em) {
29
- body {
29
+ .body {
30
30
  max-width: 480px;
31
31
  }
32
32
  }
33
33
  @media print {
34
- body {
34
+ .body {
35
35
  padding: 20px;
36
36
  }
37
- body header {
37
+ .body header {
38
38
  background-color: red;
39
39
  }
40
40
  }
41
41
  @media print and (orientation: landscape) {
42
- body {
42
+ .body {
43
43
  margin-left: 20px;
44
44
  }
45
45
  }
@@ -67,12 +67,12 @@
67
67
  }
68
68
  }
69
69
  @media a, b and c {
70
- body {
70
+ .body {
71
71
  width: 95%;
72
72
  }
73
73
  }
74
74
  @media a and x, b and c and x, a and y, b and c and y {
75
- body {
75
+ .body {
76
76
  width: 100%;
77
77
  }
78
78
  }
@@ -103,7 +103,7 @@
103
103
  }
104
104
  }
105
105
  @media only screen and (max-width: 200px) {
106
- body {
106
+ .body {
107
107
  width: 480px;
108
108
  }
109
109
  }
@@ -174,22 +174,22 @@
174
174
  background: red;
175
175
  }
176
176
  }
177
- body {
177
+ .body {
178
178
  background: red;
179
179
  }
180
180
  @media (max-width: 500px) {
181
- body {
181
+ .body {
182
182
  background: green;
183
183
  }
184
184
  }
185
185
  @media (max-width: 1000px) {
186
- body {
186
+ .body {
187
187
  background: red;
188
188
  background: blue;
189
189
  }
190
190
  }
191
191
  @media (max-width: 1000px) and (max-width: 500px) {
192
- body {
192
+ .body {
193
193
  background: green;
194
194
  }
195
195
  }
@@ -197,7 +197,7 @@ body {
197
197
  /* a comment */
198
198
  }
199
199
  @media (max-width: 1200px) and (max-width: 900px) {
200
- body {
200
+ .body {
201
201
  font-size: 11px;
202
202
  }
203
203
  }
@@ -1,35 +1,35 @@
1
- .test1 {
1
+ .test-rule1 {
2
2
  transform: rotate(90deg), skew(30deg), scale(2, 4);
3
3
  }
4
- .test2 {
4
+ .test-rule2 {
5
5
  transform: rotate(90deg), skew(30deg);
6
6
  transform: scaleX(45deg);
7
7
  }
8
- .test3 {
8
+ .test-rule3 {
9
9
  transform: scaleX(45deg);
10
10
  background: url(data://img1.png);
11
11
  }
12
- .test4 {
12
+ .test-rule4 {
13
13
  transform: rotate(90deg), skew(30deg), scale(2, 4) !important;
14
14
  }
15
- .test5 {
15
+ .test-rule5 {
16
16
  transform: rotate(90deg), skew(30deg), scale(2, 4) !important;
17
17
  }
18
- .test6 {
18
+ .test-rule6 {
19
19
  transform: scale(2, 4);
20
20
  }
21
- .test7 {
21
+ .test-rule7 {
22
22
  transform: scale(2, 4), scale(2, 4), scale(2, 4) !important;
23
23
  }
24
- .test-interleaved {
24
+ .test-rule-interleaved {
25
25
  transform: t1, t2, t3;
26
26
  background: b1, b2, b3;
27
27
  }
28
- .test-spaced {
28
+ .test-rule-spaced {
29
29
  transform: t1 t2 t3;
30
30
  background: b1 b2, b3;
31
31
  }
32
- .test-interleaved-with-spaced {
32
+ .test-rule-interleaved-with-spaced {
33
33
  transform: t1s, t2 t3s, t4 t5s t6s;
34
34
  background: b1 b2s, b3, b4;
35
35
  }
@@ -1,5 +1,5 @@
1
1
  .light1 {
2
- color: white;
2
+ color: inherit;
3
3
  margin: 1px;
4
4
  }
5
5
  .light2 {
@@ -32,19 +32,19 @@
32
32
  .default1 {
33
33
  content: default;
34
34
  }
35
- .test1 {
35
+ .test-rule1 {
36
36
  content: "true.";
37
37
  }
38
- .test2 {
38
+ .test-rule2 {
39
39
  content: "false.";
40
40
  }
41
- .test3 {
41
+ .test-rule3 {
42
42
  content: "false.";
43
43
  }
44
- .test4 {
44
+ .test-rule4 {
45
45
  content: "false.";
46
46
  }
47
- .test5 {
47
+ .test-rule5 {
48
48
  content: "false.";
49
49
  }
50
50
  .bool1 {
@@ -29,7 +29,7 @@
29
29
  background-color: grey;
30
30
  }
31
31
  #header .milk {
32
- color: white;
32
+ color: inherit;
33
33
  border: 1px solid black;
34
34
  background-color: grey;
35
35
  }
@@ -133,7 +133,7 @@ h3 + * {
133
133
  background-image: "/a.png";
134
134
  background-position: center center;
135
135
  }
136
- .test-rec .recursion {
136
+ .test-rule-rec .recursion {
137
137
  color: black;
138
138
  }
139
139
  .button {
@@ -3,6 +3,21 @@
3
3
  width: 400px;
4
4
  height: 200px;
5
5
  background: red;
6
- color: white;
6
+ color: inherit;
7
7
  }
8
8
  }
9
+ .cell {
10
+ margin: 0 5px !important;
11
+ }
12
+ .class1 {
13
+ color: #33acfe !important;
14
+ margin: 20px !important;
15
+ padding: 20px !important;
16
+ width: 0 !important;
17
+ }
18
+ .class2 {
19
+ color: #efca44;
20
+ margin: 10px;
21
+ padding: 40px 10px;
22
+ width: 0 !important;
23
+ }
@@ -1,5 +1,5 @@
1
1
  .foo {
2
2
  width: 20px;
3
3
  background: rebeccapurple;
4
- color: white;
4
+ color: inherit;
5
5
  }
@@ -2,3 +2,9 @@
2
2
  width: 20px;
3
3
  bar: val;
4
4
  }
5
+ .bar {
6
+ width: test;
7
+ }
8
+ .example {
9
+ value: lookup;
10
+ }
@@ -1,4 +1,4 @@
1
- .test-2798 {
1
+ .test-rule-2798 {
2
2
  regression: fixed;
3
3
  }
4
4
  .conditions-parser-1 {
@@ -31,7 +31,7 @@ foo[attr="blah"] {
31
31
  this: works;
32
32
  }
33
33
  }
34
- .test-comment {
34
+ .test-rule-comment {
35
35
  --value: a /* { ; } */;
36
36
  --comment-within: ( /* okay?; comment; */ );
37
37
  }
@@ -26,7 +26,7 @@
26
26
  class-local: test-local();
27
27
  }
28
28
  @media screen {
29
- .test {
29
+ .test-rule {
30
30
  result: global;
31
31
  }
32
32
  }
@@ -34,36 +34,36 @@
34
34
  result: global;
35
35
  }
36
36
  @media screen and (min-width: 100px) and (max-width: 400px) {
37
- .test {
37
+ .test-rule {
38
38
  result: global;
39
39
  }
40
40
  }
41
41
  @media screen {
42
- .test {
42
+ .test-rule {
43
43
  result: local;
44
44
  }
45
45
  }
46
46
  .root {
47
47
  prop: value;
48
48
  }
49
- .test-empty {
49
+ .test-rule-empty {
50
50
  val1: foo;
51
51
  val2: foo;
52
52
  }
53
- .test-simple {
53
+ .test-rule-simple {
54
54
  value: 3.141592653589793;
55
55
  value: 6.28318531;
56
56
  }
57
- .test-conflicts {
57
+ .test-rule-conflicts {
58
58
  value: foo;
59
59
  }
60
- .test-conflicts {
60
+ .test-rule-conflicts {
61
61
  value: bar;
62
62
  }
63
- .test-conflicts {
63
+ .test-rule-conflicts {
64
64
  value: foo;
65
65
  }
66
- .test-collection {
66
+ .test-rule-collection {
67
67
  list: 32, 5, "bird";
68
68
  }
69
69
  @arbitrary value after ();
@@ -1,4 +1,4 @@
1
1
  hr {height:50px;}
2
- .test {
3
- color: white;
2
+ .test-rule {
3
+ color: inherit;
4
4
  }
@@ -1,3 +1,3 @@
1
- .test {
1
+ .test-rule {
2
2
  color: red;
3
3
  }
@@ -125,10 +125,10 @@ p a span {
125
125
  :nth-child(3) {
126
126
  selector: interpolated;
127
127
  }
128
- .test:nth-child(3) {
128
+ .test-rule:nth-child(3) {
129
129
  selector: interpolated;
130
130
  }
131
- .test:nth-child(odd):not(:nth-child(3)) {
131
+ .test-rule:nth-child(odd):not(:nth-child(3)) {
132
132
  color: #ff0000;
133
133
  }
134
134
  [prop],
@@ -37,7 +37,7 @@
37
37
  .alpha {
38
38
  filter: alpha(opacity=42);
39
39
  }
40
- .testPollution {
40
+ .test-rulePollution {
41
41
  a: 'no-pollution';
42
42
  }
43
43
  .units {
@@ -1,3 +1,3 @@
1
- .test {
1
+ .test-rule {
2
2
  color: red;
3
3
  }
package/test/index.js CHANGED
@@ -48,6 +48,12 @@ var testMap = [
48
48
  }
49
49
  return path.join('test/sourcemaps', filename) + '.json';
50
50
  }],
51
+
52
+ [{math: 'strict', strictUnits: true, globalVars: true }, 'import/json/',
53
+ lessTester.testImports, null, true,
54
+ function(filename, type, baseFolder) {
55
+ return path.join(baseFolder, filename) + '.json';
56
+ }],
51
57
  [{math: 'strict', strictUnits: true, sourceMap: {sourceMapFileInline: true}},
52
58
  'sourcemaps-empty/', lessTester.testEmptySourcemap],
53
59
  [{globalVars: true, banner: '/**\n * Test\n */\n'}, 'globalVars/',
@@ -27,4 +27,20 @@
27
27
  .c {
28
28
  @v: 10px;
29
29
  height: calc(100% - ((@v * 3) + (@v * 2)));
30
- }
30
+ }
31
+
32
+ .correctly-exit-calc-mode {
33
+ @a: 10;
34
+ h2 { width: unit(@a, px); }
35
+
36
+ div { width: calc(100px * 2); }
37
+
38
+ .mk-map() {
39
+ text: white;
40
+ background: black;
41
+ }
42
+
43
+ @p: .mk-map();
44
+
45
+ h1 { color: @p[text]; }
46
+ }
@@ -71,7 +71,7 @@
71
71
  @b: 1px //put in @b - causes problems! --->
72
72
  ) // the
73
73
  when (@a = white) {
74
- .test {
74
+ .test-rule {
75
75
  color: @b;
76
76
  }
77
77
  }
@@ -20,25 +20,25 @@ p:not([class*="lead"]) {
20
20
  }
21
21
 
22
22
  input[type="text"].class#id[attr=32]:not(1) {
23
- color: white;
23
+ color: inherit;
24
24
  }
25
25
 
26
26
  div#id.class[a=1][b=2].class:not(1) {
27
- color: white;
27
+ color: inherit;
28
28
  }
29
29
 
30
30
  ul.comma > li:not(:only-child)::after {
31
- color: white;
31
+ color: inherit;
32
32
  }
33
33
 
34
34
  ol.comma > li:nth-last-child(2)::after {
35
- color: white;
35
+ color: inherit;
36
36
  }
37
37
 
38
38
  li:nth-child(4n+1),
39
39
  li:nth-child(-5n),
40
40
  li:nth-child(-n+2) {
41
- color: white;
41
+ color: inherit;
42
42
  }
43
43
 
44
44
  a[href^="http://"] {
@@ -31,7 +31,7 @@
31
31
  @d: 3;
32
32
 
33
33
  .inheritance when (@b = 2) {
34
- .test {
34
+ .test-rule {
35
35
  color: black;
36
36
  }
37
37
  &:hover {
@@ -46,7 +46,7 @@
46
46
  }
47
47
 
48
48
  .hideme when (@b = 1) {
49
- .test {
49
+ .test-rule {
50
50
  color: black;
51
51
  }
52
52
  &:hover {
@@ -7,7 +7,7 @@
7
7
  @media screen {
8
8
  color: red;
9
9
  .tst3 {
10
- color: white;
10
+ color: inherit;
11
11
  }
12
12
  }
13
13
  }
@@ -16,7 +16,7 @@
16
16
 
17
17
  .mixin_import2() {
18
18
  .tst2 {
19
- color: white;
19
+ color: inherit;
20
20
  }
21
21
  }
22
22
 
@@ -3,7 +3,7 @@
3
3
  @import "import/test.less";
4
4
 
5
5
  .start() {
6
- .test2 {
6
+ .test-rule2 {
7
7
  color: red;
8
8
  }
9
9
  }
@@ -12,7 +12,7 @@
12
12
  color: black;
13
13
  }
14
14
 
15
- .test1 {
15
+ .test-rule1 {
16
16
  .mix();
17
17
  }
18
18
 
@@ -24,7 +24,7 @@
24
24
 
25
25
  @debug: 1;
26
26
  & when (@debug = 1) {
27
- .test {
27
+ .test-rule {
28
28
  color: red;
29
29
  & when (@debug = 1) {
30
30
  width: 2;
@@ -1,3 +1,3 @@
1
- .test {
1
+ .test-rule {
2
2
  color: color("NOT A COLOR");
3
3
  }
@@ -1,4 +1,4 @@
1
1
  ArgumentError: error evaluating function `color`: argument must be a color keyword or 3|4|6|8 digit hex e.g. #FFF in {path}color-func-invalid-color.less on line 2, column 10:
2
- 1 .test {
2
+ 1 .test-rule {
3
3
  2 color: color("NOT A COLOR");
4
4
  3 }
@@ -0,0 +1 @@
1
+ .test {color: #fffff /* comment */ ;}
@@ -0,0 +1,2 @@
1
+ ParseError: Unrecognised input in {path}invalid-color-with-comment.less on line 1, column 36:
2
+ 1 .test {color: #fffff /* comment */ ;}
@@ -1,2 +1,2 @@
1
- SyntaxError: Error in {path}plugin-error.js{node} on line 1, column 8:
2
- 1 throw new Error('Error');{/node}
1
+ SyntaxError: Error in {path}plugin-error.js on line 1, column 8:
2
+ 1 throw new Error('Error');
@@ -1,5 +1,4 @@
1
- SyntaxError: An error was here. in {path}plugin-error-2.js{node} on line 3, column 16:
1
+ SyntaxError: An error was here. in {path}plugin-error-2.js on line 3, column 16:
2
2
  2 use: function() {
3
3
  3 throw new Error('An error was here.')
4
4
  4 }
5
- {/node}
@@ -1,5 +1,4 @@
1
- SyntaxError: Plugin error during evaluation in {path}plugin-error-3.js{node} on line 3, column 16:
1
+ SyntaxError: Plugin error during evaluation in {path}plugin-error-3.js on line 3, column 16:
2
2
  2 eval: function() {
3
3
  3 throw new Error('An error was here.')
4
4
  4 }
5
- {/node}
@@ -1,3 +1,3 @@
1
- .test {
1
+ .test-rule {
2
2
  display/*/: block; /*sorry for IE5*/
3
3
  }