less 2.3.3 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog.md +5 -0
  3. data/less.gemspec +1 -1
  4. data/lib/less/js/.gitattributes +9 -0
  5. data/lib/less/js/.gitignore +1 -0
  6. data/lib/less/js/.npmignore +1 -1
  7. data/lib/less/js/CHANGELOG.md +68 -0
  8. data/lib/less/js/CONTRIBUTING.md +33 -34
  9. data/lib/less/js/Makefile +24 -9
  10. data/lib/less/js/README.md +2 -2
  11. data/lib/less/js/bin/lessc +102 -25
  12. data/lib/less/js/build/amd.js +1 -1
  13. data/lib/less/js/build/header.js +9 -7
  14. data/lib/less/js/dist/less-1.3.3.js +2 -2
  15. data/lib/less/js/dist/less-1.3.3.min.js +2 -2
  16. data/lib/less/js/dist/less-1.4.0-beta.js +5830 -0
  17. data/lib/less/js/dist/less-1.4.0-beta.min.js +11 -0
  18. data/lib/less/js/dist/less-1.4.0.js +5830 -0
  19. data/lib/less/js/dist/less-1.4.0.min.js +11 -0
  20. data/lib/less/js/dist/less-1.4.1.js +5837 -0
  21. data/lib/less/js/dist/less-1.4.1.min.js +11 -0
  22. data/lib/less/js/dist/less-1.4.2.js +5837 -0
  23. data/lib/less/js/dist/less-1.4.2.min.js +11 -0
  24. data/lib/less/js/dist/less-rhino-1.4.0.js +4273 -0
  25. data/lib/less/js/lib/less/browser.js +131 -101
  26. data/lib/less/js/lib/less/env.js +105 -0
  27. data/lib/less/js/lib/less/extend-visitor.js +391 -0
  28. data/lib/less/js/lib/less/functions.js +174 -19
  29. data/lib/less/js/lib/less/import-visitor.js +107 -0
  30. data/lib/less/js/lib/less/index.js +70 -63
  31. data/lib/less/js/lib/less/join-selector-visitor.js +37 -0
  32. data/lib/less/js/lib/less/lessc_helper.js +13 -4
  33. data/lib/less/js/lib/less/parser.js +353 -264
  34. data/lib/less/js/lib/less/rhino.js +5 -2
  35. data/lib/less/js/lib/less/tree.js +1 -1
  36. data/lib/less/js/lib/less/tree/alpha.js +7 -3
  37. data/lib/less/js/lib/less/tree/anonymous.js +1 -0
  38. data/lib/less/js/lib/less/tree/assignment.js +4 -0
  39. data/lib/less/js/lib/less/tree/call.js +14 -8
  40. data/lib/less/js/lib/less/tree/color.js +50 -5
  41. data/lib/less/js/lib/less/tree/comment.js +1 -0
  42. data/lib/less/js/lib/less/tree/condition.js +35 -28
  43. data/lib/less/js/lib/less/tree/dimension.js +270 -16
  44. data/lib/less/js/lib/less/tree/directive.js +7 -2
  45. data/lib/less/js/lib/less/tree/element.js +57 -21
  46. data/lib/less/js/lib/less/tree/expression.js +29 -4
  47. data/lib/less/js/lib/less/tree/extend.js +43 -0
  48. data/lib/less/js/lib/less/tree/import.js +49 -28
  49. data/lib/less/js/lib/less/tree/javascript.js +1 -0
  50. data/lib/less/js/lib/less/tree/keyword.js +3 -2
  51. data/lib/less/js/lib/less/tree/media.js +20 -4
  52. data/lib/less/js/lib/less/tree/mixin.js +38 -18
  53. data/lib/less/js/lib/less/tree/negative.js +22 -0
  54. data/lib/less/js/lib/less/tree/operation.js +32 -17
  55. data/lib/less/js/lib/less/tree/paren.js +5 -1
  56. data/lib/less/js/lib/less/tree/quoted.js +5 -3
  57. data/lib/less/js/lib/less/tree/rule.js +44 -31
  58. data/lib/less/js/lib/less/tree/ruleset.js +50 -23
  59. data/lib/less/js/lib/less/tree/selector.js +49 -39
  60. data/lib/less/js/lib/less/tree/unicode-descriptor.js +1 -0
  61. data/lib/less/js/lib/less/tree/url.js +9 -5
  62. data/lib/less/js/lib/less/tree/value.js +4 -1
  63. data/lib/less/js/lib/less/tree/variable.js +4 -3
  64. data/lib/less/js/lib/less/visitor.js +54 -0
  65. data/lib/less/js/package.json +69 -19
  66. data/lib/less/js/test/browser-test-prepare.js +23 -6
  67. data/lib/less/js/test/browser/common.js +55 -3
  68. data/lib/less/js/test/browser/css/urls.css +13 -0
  69. data/lib/less/js/test/browser/less/relative-urls/urls.less +1 -1
  70. data/lib/less/js/test/browser/less/urls.less +16 -0
  71. data/lib/less/js/test/browser/phantom-runner.js +7 -5
  72. data/lib/less/js/test/browser/runner-browser.js +5 -1
  73. data/lib/less/js/test/browser/runner-errors.js +5 -0
  74. data/lib/less/js/test/browser/runner-legacy.js +6 -0
  75. data/lib/less/js/test/browser/runner-production.js +7 -0
  76. data/lib/less/js/test/browser/template.htm +6 -6
  77. data/lib/less/js/test/css/comments.css +1 -0
  78. data/lib/less/js/test/css/compression/compression.css +2 -0
  79. data/lib/less/js/test/css/css-3.css +4 -0
  80. data/lib/less/js/test/css/css.css +9 -3
  81. data/lib/less/js/test/css/extend-chaining.css +72 -0
  82. data/lib/less/js/test/css/extend-clearfix.css +19 -0
  83. data/lib/less/js/test/css/extend-exact.css +37 -0
  84. data/lib/less/js/test/css/extend-media.css +24 -0
  85. data/lib/less/js/test/css/extend-nest.css +57 -0
  86. data/lib/less/js/test/css/extend-selector.css +72 -0
  87. data/lib/less/js/test/css/extend.css +76 -0
  88. data/lib/less/js/test/css/functions.css +28 -0
  89. data/lib/less/js/test/css/import-interpolation.css +6 -0
  90. data/lib/less/js/test/css/import.css +18 -1
  91. data/lib/less/js/test/css/legacy/legacy.css +7 -0
  92. data/lib/less/js/test/css/media.css +9 -1
  93. data/lib/less/js/test/css/mixins-args.css +18 -0
  94. data/lib/less/js/test/css/mixins-guards.css +5 -0
  95. data/lib/less/js/test/css/parens.css +18 -5
  96. data/lib/less/js/test/css/selectors.css +14 -6
  97. data/lib/less/js/test/css/urls.css +17 -0
  98. data/lib/less/js/test/css/variables.css +22 -3
  99. data/lib/less/js/test/data/data-uri-fail.png +0 -0
  100. data/lib/less/js/test/data/image.jpg +0 -0
  101. data/lib/less/js/test/data/page.html +1 -0
  102. data/lib/less/js/test/less-test.js +41 -9
  103. data/lib/less/js/test/less/colors.less +4 -4
  104. data/lib/less/js/test/less/comments.less +2 -2
  105. data/lib/less/js/test/less/compression/compression.less +16 -0
  106. data/lib/less/js/test/less/css-3.less +5 -1
  107. data/lib/less/js/test/less/css.less +9 -3
  108. data/lib/less/js/test/less/errors/add-mixed-units.less +3 -0
  109. data/lib/less/js/test/less/errors/add-mixed-units.txt +2 -0
  110. data/lib/less/js/test/less/errors/add-mixed-units2.less +3 -0
  111. data/lib/less/js/test/less/errors/add-mixed-units2.txt +2 -0
  112. data/lib/less/js/test/less/errors/bad-variable-declaration1.txt +1 -1
  113. data/lib/less/js/test/less/errors/color-operation-error.less +3 -0
  114. data/lib/less/js/test/less/errors/color-operation-error.txt +2 -0
  115. data/lib/less/js/test/less/errors/comment-in-selector.txt +1 -1
  116. data/lib/less/js/test/less/errors/divide-mixed-units.less +3 -0
  117. data/lib/less/js/test/less/errors/divide-mixed-units.txt +4 -0
  118. data/lib/less/js/test/less/errors/extend-no-selector.less +3 -0
  119. data/lib/less/js/test/less/errors/extend-no-selector.txt +3 -0
  120. data/lib/less/js/test/less/errors/extend-not-at-end.less +3 -0
  121. data/lib/less/js/test/less/errors/extend-not-at-end.txt +3 -0
  122. data/lib/less/js/test/less/errors/import-missing.less +5 -0
  123. data/lib/less/js/test/less/errors/import-missing.txt +3 -3
  124. data/lib/less/js/test/less/errors/import-no-semi.txt +1 -1
  125. data/lib/less/js/test/less/errors/import-subfolder1.txt +1 -1
  126. data/lib/less/js/test/less/errors/import-subfolder2.txt +1 -1
  127. data/lib/less/js/test/less/errors/javascript-error.txt +1 -1
  128. data/lib/less/js/test/less/errors/mixed-mixin-definition-args-1.txt +1 -1
  129. data/lib/less/js/test/less/errors/mixed-mixin-definition-args-2.txt +1 -1
  130. data/lib/less/js/test/less/errors/mixin-not-defined.txt +1 -1
  131. data/lib/less/js/test/less/errors/mixin-not-matched.txt +1 -1
  132. data/lib/less/js/test/less/errors/mixin-not-matched2.txt +1 -1
  133. data/lib/less/js/test/less/errors/multiply-mixed-units.less +7 -0
  134. data/lib/less/js/test/less/errors/multiply-mixed-units.txt +4 -0
  135. data/lib/less/js/test/less/errors/parens-error-1.less +3 -0
  136. data/lib/less/js/test/less/errors/parens-error-1.txt +4 -0
  137. data/lib/less/js/test/less/errors/parens-error-2.less +3 -0
  138. data/lib/less/js/test/less/errors/parens-error-2.txt +4 -0
  139. data/lib/less/js/test/less/errors/parens-error-3.less +3 -0
  140. data/lib/less/js/test/less/errors/parens-error-3.txt +4 -0
  141. data/lib/less/js/test/less/errors/parse-error-curly-bracket.txt +1 -1
  142. data/lib/less/js/test/less/errors/parse-error-missing-bracket.txt +2 -1
  143. data/lib/less/js/test/less/errors/parse-error-with-import.txt +1 -1
  144. data/lib/less/js/test/less/errors/property-ie5-hack.txt +1 -1
  145. data/lib/less/js/test/less/errors/property-in-root.less +4 -0
  146. data/lib/less/js/test/less/errors/property-in-root.txt +4 -0
  147. data/lib/less/js/test/less/errors/property-in-root2.less +1 -0
  148. data/lib/less/js/test/less/errors/property-in-root2.txt +4 -0
  149. data/lib/less/js/test/less/errors/property-in-root3.less +4 -0
  150. data/lib/less/js/test/less/errors/property-in-root3.txt +3 -0
  151. data/lib/less/js/test/less/errors/recursive-variable.txt +1 -1
  152. data/lib/less/js/test/less/extend-chaining.less +79 -0
  153. data/lib/less/js/test/less/extend-clearfix.less +19 -0
  154. data/lib/less/js/test/less/extend-exact.less +46 -0
  155. data/lib/less/js/test/less/extend-media.less +24 -0
  156. data/lib/less/js/test/less/extend-nest.less +65 -0
  157. data/lib/less/js/test/less/extend-selector.less +84 -0
  158. data/lib/less/js/test/less/extend.less +81 -0
  159. data/lib/less/js/test/less/functions.less +37 -6
  160. data/lib/less/js/test/less/import-interpolation.less +8 -0
  161. data/lib/less/js/test/less/import-once.less +4 -4
  162. data/lib/less/js/test/less/import.less +11 -2
  163. data/lib/less/js/test/less/import/deeper/import-once-test-a.less +1 -1
  164. data/lib/less/js/test/less/import/import-interpolation.less +1 -0
  165. data/lib/less/js/test/less/import/import-interpolation2.less +5 -0
  166. data/lib/less/js/test/less/javascript.less +1 -1
  167. data/lib/less/js/test/less/legacy/legacy.less +7 -0
  168. data/lib/less/js/test/less/media.less +14 -3
  169. data/lib/less/js/test/less/mixins-args.less +43 -5
  170. data/lib/less/js/test/less/mixins-guards.less +13 -0
  171. data/lib/less/js/test/less/mixins-named-args.less +5 -5
  172. data/lib/less/js/test/less/mixins-nested.less +2 -2
  173. data/lib/less/js/test/less/mixins-pattern.less +1 -1
  174. data/lib/less/js/test/less/mixins.less +1 -1
  175. data/lib/less/js/test/less/operations.less +27 -27
  176. data/lib/less/js/test/less/parens.less +20 -5
  177. data/lib/less/js/test/less/selectors.less +14 -7
  178. data/lib/less/js/test/less/urls.less +24 -0
  179. data/lib/less/js/test/less/variables.less +42 -12
  180. data/lib/less/loader.rb +33 -0
  181. data/lib/less/version.rb +1 -1
  182. data/spec/less/parser_spec.rb +5 -5
  183. metadata +76 -6
  184. data/lib/less/js/build/ecma-5.js +0 -120
  185. data/lib/less/js/lib/less/tree/ratio.js +0 -13
@@ -36,7 +36,7 @@
36
36
  ------------------- */
37
37
  #comments /* boo */ {
38
38
  /**/ // An empty comment
39
- color: red; /* A C-style comment */
39
+ color: red; /* A C-style comment */ /* A C-style comment */
40
40
  background-color: orange; // A little comment
41
41
  font-size: 12px;
42
42
 
@@ -58,7 +58,7 @@
58
58
  .selector /* .with */, .lots, /* of */ .comments {
59
59
  color: grey, /* blue */ orange;
60
60
  -webkit-border-radius: 2px /* webkit only */;
61
- -moz-border-radius: 2px * 4 /* moz only with operation */;
61
+ -moz-border-radius: (2px * 4) /* moz only with operation */;
62
62
  }
63
63
 
64
64
  .mixin_def_with_colors(@a: white, // in
@@ -0,0 +1,16 @@
1
+ #colours {
2
+ color1: #fea;
3
+ color2: #ffeeaa;
4
+ color3: rgba(255, 238, 170, 0.1);
5
+ @color1: #fea;
6
+ string: "@{color1}";
7
+ }
8
+ dimensions {
9
+ val: 0.1px;
10
+ val: 0em;
11
+ val: 4cm;
12
+ val: 0.2;
13
+ val: 5;
14
+ angles-must-have-unit: 0deg;
15
+ width: auto\9;
16
+ }
@@ -2,6 +2,7 @@
2
2
  text-shadow: -1px -1px 1px red, 6px 5px 5px yellow;
3
3
  -moz-box-shadow: 0pt 0pt 2px rgba(255, 255, 255, 0.4) inset,
4
4
  0pt 4px 6px rgba(255, 255, 255, 0.4) inset;
5
+ -webkit-transform: rotate(-0.0000000001deg);
5
6
  }
6
7
  @font-face {
7
8
  font-family: Headline;
@@ -110,4 +111,7 @@ foo|h1 { color: blue; }
110
111
  foo|* { color: yellow; }
111
112
  |h1 { color: red; }
112
113
  *|h1 { color: green; }
113
- h1 { color: green; }
114
+ h1 { color: green; }
115
+ .upper-test {
116
+ UpperCaseProperties: allowed;
117
+ }
@@ -27,11 +27,15 @@ div#id {
27
27
  }
28
28
 
29
29
  @media print {
30
- font-size: 3em;
30
+ * {
31
+ font-size: 3em;
32
+ }
31
33
  }
32
34
 
33
35
  @media screen {
34
- font-size: 10px;
36
+ * {
37
+ font-size: 10px;
38
+ }
35
39
  }
36
40
 
37
41
  @font-face {
@@ -65,8 +69,9 @@ p + h1 {
65
69
  #more-shorthands {
66
70
  margin: 0;
67
71
  padding: 1px 0 2px 0;
68
- font: normal small/20px 'Trebuchet MS', Verdana, sans-serif;
72
+ font: normal small/20px 'Trebuchet MS', Verdana, sans-serif;
69
73
  font: 0/0 a;
74
+ border-radius: 5px / 10px;
70
75
  }
71
76
 
72
77
  .misc {
@@ -80,6 +85,7 @@ p + h1 {
80
85
  multiple-semi-colons: yes;;;;;;
81
86
  };
82
87
  filter: alpha(opacity=100);
88
+ width: auto\9;
83
89
  }
84
90
 
85
91
  #important {
@@ -0,0 +1,3 @@
1
+ .a {
2
+ error: (1px + 3em);
3
+ }
@@ -0,0 +1,2 @@
1
+ SyntaxError: Incompatible units. Change the units or use the unit function. Bad units: 'px' and 'em'. in {path}add-mixed-units.less on line null, column 0:
2
+ 1 error: (1px + 3em);
@@ -0,0 +1,3 @@
1
+ .a {
2
+ error: ((1px * 2px) + (3em * 3px));
3
+ }
@@ -0,0 +1,2 @@
1
+ SyntaxError: Incompatible units. Change the units or use the unit function. Bad units: 'px*px' and 'em*px'. in {path}add-mixed-units2.less on line null, column 0:
2
+ 1 error: ((1px * 2px) + (3em * 3px));
@@ -1,2 +1,2 @@
1
- ParseError: Syntax Error on line 1 in {path}bad-variable-declaration1.less:1:0
1
+ ParseError: Unrecognised input in {path}bad-variable-declaration1.less on line 1, column 1:
2
2
  1 @@demo: "hi";
@@ -0,0 +1,3 @@
1
+ .a {
2
+ prop: (3 / #fff);
3
+ }
@@ -0,0 +1,2 @@
1
+ OperationError: Can't substract or divide a color from a number in {path}color-operation-error.less on line null, column 0:
2
+ 1 prop: (3 / #fff);
@@ -1,2 +1,2 @@
1
- ParseError: Syntax Error on line 1 in {path}comment-in-selector.less:1:20
1
+ ParseError: Unrecognised input in {path}comment-in-selector.less on line 1, column 21:
2
2
  1 #gaga /* Comment */ span { color: red }
@@ -0,0 +1,3 @@
1
+ .a {
2
+ error: (1px / 3em);
3
+ }
@@ -0,0 +1,4 @@
1
+ SyntaxError: Multiple units in dimension. Correct the units or use the unit function. Bad unit: px/em in {path}divide-mixed-units.less on line 2, column 3:
2
+ 1 .a {
3
+ 2 error: (1px / 3em);
4
+ 3 }
@@ -0,0 +1,3 @@
1
+ :extend(.a all) {
2
+ property: red;
3
+ }
@@ -0,0 +1,3 @@
1
+ SyntaxError: Extend must be used to extend a selector, it cannot be used on its own in {path}extend-no-selector.less on line 1, column 17:
2
+ 1 :extend(.a all) {
3
+ 2 property: red;
@@ -0,0 +1,3 @@
1
+ .a:extend(.b all).c {
2
+ property: red;
3
+ }
@@ -0,0 +1,3 @@
1
+ SyntaxError: Extend can only be used at the end of selector in {path}extend-not-at-end.less on line 1, column 21:
2
+ 1 .a:extend(.b all).c {
3
+ 2 property: red;
@@ -1 +1,6 @@
1
+ .a {
2
+ color: green;
3
+ // tests line number for import reference is correct
4
+ }
5
+
1
6
  @import "file-does-not-exist.less";
@@ -1,3 +1,3 @@
1
- FileError: 'file-does-not-exist.less' wasn't found.
2
- in {path}import-missing.less:1:0
3
- 1 @import "file-does-not-exist.less";
1
+ FileError: '{pathhref}file-does-not-exist.less' wasn't found{404status} in {path}import-missing.less on line 6, column 1:
2
+ 5
3
+ 6 @import "file-does-not-exist.less";
@@ -1,2 +1,2 @@
1
- ParseError: Syntax Error on line 1 in {path}import-no-semi.less:1:0
1
+ ParseError: Unrecognised input in {path}import-no-semi.less on line 1, column 1:
2
2
  1 @import "this-statement-is-invalid.less"
@@ -1,3 +1,3 @@
1
- NameError: .mixin-not-defined is undefined in {pathrel}mixin-not-defined.less:11:0
1
+ NameError: .mixin-not-defined is undefined in {path}mixin-not-defined.less on line 11, column 1:
2
2
  10
3
3
  11 .mixin-not-defined();
@@ -1,2 +1,2 @@
1
- ParseError: missing opening `{` in {pathrel}parse-error-curly-bracket.less:1:1
1
+ ParseError: missing opening `{` in {path}parse-error-curly-bracket.less on line 1, column 2:
2
2
  1 }}
@@ -1,4 +1,4 @@
1
- SyntaxError: JavaScript evaluation error: 'TypeError: Cannot call method 'toJS' of undefined' in {path}javascript-error.less:2:26
1
+ SyntaxError: JavaScript evaluation error: 'TypeError: Cannot call method 'toJS' of undefined' in {path}javascript-error.less on line 2, column 27:
2
2
  1 .scope {
3
3
  2 var: `this.foo.toJS()`;
4
4
  3 }
@@ -1,4 +1,4 @@
1
- SyntaxError: Cannot mix ; and , as delimiter types in {path}mixed-mixin-definition-args-1.less:5:29
1
+ SyntaxError: Cannot mix ; and , as delimiter types in {path}mixed-mixin-definition-args-1.less on line 5, column 30:
2
2
  4 .mixin-test {
3
3
  5 .mixin(@a: 5; @b: 6, @c: 7);
4
4
  6 }
@@ -1,4 +1,4 @@
1
- SyntaxError: Cannot mix ; and , as delimiter types in {path}mixed-mixin-definition-args-2.less:5:25
1
+ SyntaxError: Cannot mix ; and , as delimiter types in {path}mixed-mixin-definition-args-2.less on line 5, column 26:
2
2
  4 .mixin-test {
3
3
  5 .mixin(@a: 5, @b: 6; @c: 7);
4
4
  6 }
@@ -1,3 +1,3 @@
1
- NameError: .mixin-not-defined is undefined in {path}mixin-not-defined.less:11:0
1
+ NameError: .mixin-not-defined is undefined in {path}mixin-not-defined.less on line 11, column 1:
2
2
  10
3
3
  11 .mixin-not-defined();
@@ -1,3 +1,3 @@
1
- RuntimeError: No matching definition was found for `.mixin(trumpete)` in {path}mixin-not-matched.less:6:0
1
+ RuntimeError: No matching definition was found for `.mixin(trumpete)` in {path}mixin-not-matched.less on line 6, column 1:
2
2
  5
3
3
  6 .mixin(@saxofon);
@@ -1,3 +1,3 @@
1
- RuntimeError: No matching definition was found for `.mixin(@a:trumpete)` in {path}mixin-not-matched2.less:6:0
1
+ RuntimeError: No matching definition was found for `.mixin(@a:trumpete)` in {path}mixin-not-matched2.less on line 6, column 1:
2
2
  5
3
3
  6 .mixin(@a: @saxofon);
@@ -0,0 +1,7 @@
1
+ /* Test */
2
+ #blah {
3
+ // blah
4
+ }
5
+ .a {
6
+ error: (1px * 1em);
7
+ }
@@ -0,0 +1,4 @@
1
+ SyntaxError: Multiple units in dimension. Correct the units or use the unit function. Bad unit: em*px in {path}multiply-mixed-units.less on line 6, column 3:
2
+ 5 .a {
3
+ 6 error: (1px * 1em);
4
+ 7 }
@@ -0,0 +1,3 @@
1
+ .a {
2
+ something: (12 (13 + 5 -23) + 5);
3
+ }
@@ -0,0 +1,4 @@
1
+ SyntaxError: expected ')' got '(' in {path}parens-error-1.less on line 2, column 18:
2
+ 1 .a {
3
+ 2 something: (12 (13 + 5 -23) + 5);
4
+ 3 }
@@ -0,0 +1,3 @@
1
+ .a {
2
+ something: (12 * (13 + 5 -23));
3
+ }
@@ -0,0 +1,4 @@
1
+ SyntaxError: expected ')' got '-' in {path}parens-error-2.less on line 2, column 28:
2
+ 1 .a {
3
+ 2 something: (12 * (13 + 5 -23));
4
+ 3 }
@@ -0,0 +1,3 @@
1
+ .a {
2
+ something: (12 + (13 + 10 -23));
3
+ }
@@ -0,0 +1,4 @@
1
+ SyntaxError: expected ')' got '-' in {path}parens-error-3.less on line 2, column 29:
2
+ 1 .a {
3
+ 2 something: (12 + (13 + 10 -23));
4
+ 3 }
@@ -1,2 +1,2 @@
1
- ParseError: missing opening `{` in {path}parse-error-curly-bracket.less:1:1
1
+ ParseError: missing opening `{` in {path}parse-error-curly-bracket.less on line 1, column 2:
2
2
  1 }}
@@ -1,2 +1,3 @@
1
- ParseError: missing closing `}` in {path}parse-error-missing-bracket.less:3:0
1
+ ParseError: missing closing `}` in {path}parse-error-missing-bracket.less on line 3, column 1:
2
2
  2 background-color: #fff;
3
+ 3
@@ -1,4 +1,4 @@
1
- ParseError: Syntax Error on line 8 in {path}parse-error-with-import.less:8:8
1
+ ParseError: Unrecognised input in {path}parse-error-with-import.less on line 8, column 9:
2
2
  7
3
3
  8 nonsense;
4
4
  9
@@ -1,4 +1,4 @@
1
- ParseError: Syntax Error on line 2 in {path}property-ie5-hack.less:2:2
1
+ ParseError: Unrecognised input in {path}property-ie5-hack.less on line 2, column 3:
2
2
  1 .test {
3
3
  2 display/*/: block; /*sorry for IE5*/
4
4
  3 }
@@ -0,0 +1,4 @@
1
+ .a() {
2
+ prop:1;
3
+ }
4
+ .a();
@@ -0,0 +1,4 @@
1
+ SyntaxError: properties must be inside selector blocks, they cannot be in the root. in {path}property-in-root.less on line 2, column 3:
2
+ 1 .a() {
3
+ 2 prop:1;
4
+ 3 }
@@ -0,0 +1 @@
1
+ @import "property-in-root";
@@ -0,0 +1,4 @@
1
+ SyntaxError: properties must be inside selector blocks, they cannot be in the root. in {path}property-in-root.less on line 2, column 3:
2
+ 1 .a() {
3
+ 2 prop:1;
4
+ 3 }
@@ -0,0 +1,4 @@
1
+ prop:1;
2
+ .a {
3
+ prop:1;
4
+ }
@@ -0,0 +1,3 @@
1
+ SyntaxError: properties must be inside selector blocks, they cannot be in the root. in {path}property-in-root3.less on line 1, column 1:
2
+ 1 prop:1;
3
+ 2 .a {
@@ -1,2 +1,2 @@
1
- NameError: Recursive variable definition for @bodyColor in {path}recursive-variable.less:1:19
1
+ NameError: Recursive variable definition for @bodyColor in {path}recursive-variable.less on line 1, column 20:
2
2
  1 @bodyColor: darken(@bodyColor, 30%);
@@ -0,0 +1,79 @@
1
+ //very simple chaining
2
+ .a {
3
+ color: black;
4
+ }
5
+ .b:extend(.a) {}
6
+ .c:extend(.b) {}
7
+
8
+ //very simple chaining, ordering not important
9
+
10
+ .d:extend(.e) {}
11
+ .e:extend(.f) {}
12
+ .f {
13
+ color: black;
14
+ }
15
+
16
+ //extend with all
17
+
18
+ .g.h {
19
+ color: black;
20
+ }
21
+ .i.j:extend(.g all) {
22
+ color: white;
23
+ }
24
+ .k:extend(.i all) {}
25
+
26
+ //extend multi-chaining
27
+
28
+ .l {
29
+ color: black;
30
+ }
31
+ .m:extend(.l){}
32
+ .n:extend(.m){}
33
+ .o:extend(.n){}
34
+ .p:extend(.o){}
35
+ .q:extend(.p){}
36
+ .r:extend(.q){}
37
+ .s:extend(.r){}
38
+ .t:extend(.s){}
39
+
40
+ // self referencing is ignored
41
+
42
+ .u {color: black;}
43
+ .v.u.v:extend(.u all){}
44
+
45
+ // circular reference because the new extend product will match the existing extend
46
+
47
+ .w:extend(.w) {color: black;}
48
+ .v.w.v:extend(.w all){}
49
+
50
+ // classic circular references
51
+
52
+ .x:extend(.z) {
53
+ color: x;
54
+ }
55
+ .y:extend(.x) {
56
+ color: y;
57
+ }
58
+ .z:extend(.y) {
59
+ color: z;
60
+ }
61
+
62
+ // media queries - dont extend outside, do extend inside
63
+
64
+ @media tv {
65
+ .ma:extend(.a,.b,.c,.d,.e,.f,.g,.h,.i,.j,.k,.l,.m,.n,.o,.p,.q,.r,.s,.t,.u,.v,.w,.x,.y,.z,.md) {
66
+ color: black;
67
+ }
68
+ .md {
69
+ color: white;
70
+ }
71
+ @media plasma {
72
+ .me, .mf {
73
+ &:extend(.mb,.md);
74
+ background: red;
75
+ }
76
+ }
77
+ }
78
+ .mb:extend(.ma) {};
79
+ .mc:extend(.mb) {};
@@ -0,0 +1,19 @@
1
+ .clearfix {
2
+ *zoom: 1;
3
+ &:after {
4
+ content: '';
5
+ display: block;
6
+ clear: both;
7
+ height: 0;
8
+ }
9
+ }
10
+
11
+ .foo {
12
+ &:extend(.clearfix all);
13
+ color: red;
14
+ }
15
+
16
+ .bar {
17
+ &:extend(.clearfix all);
18
+ color: blue;
19
+ }
@@ -0,0 +1,46 @@
1
+ .replace.replace,
2
+ .c.replace + .replace {
3
+ .replace,
4
+ .c {
5
+ prop: copy-paste-replace;
6
+ }
7
+ }
8
+ .rep_ace:extend(.replace.replace .replace) {}
9
+
10
+ .a .b .c {
11
+ prop: not_effected;
12
+ }
13
+
14
+ .a {
15
+ prop: is_effected;
16
+ .b {
17
+ prop: not_effected;
18
+ }
19
+ .b.c {
20
+ prop: not_effected;
21
+ }
22
+ }
23
+
24
+ .c, .a {
25
+ .b, .a {
26
+ .a, .c {
27
+ prop: not_effected;
28
+ }
29
+ }
30
+ }
31
+
32
+ .effected {
33
+ &:extend(.a);
34
+ &:extend(.b);
35
+ &:extend(.c);
36
+ }
37
+
38
+ .e {
39
+ && {
40
+ prop: extend-double;
41
+ &:hover {
42
+ hover: not-extended;
43
+ }
44
+ }
45
+ }
46
+ .dbl:extend(.e.e) {}