less 2.5.2 → 2.5.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 (49) hide show
  1. package/.idea/jsLibraryMappings.xml +7 -7
  2. package/.idea/less.js.iml +9 -16
  3. package/.idea/libraries/less_js_node_modules.xml +14 -0
  4. package/.idea/misc.xml +14 -5
  5. package/.idea/modules.xml +8 -9
  6. package/.idea/vcs.xml +6 -7
  7. package/.idea/workspace.xml +592 -824
  8. package/.jscsrc +72 -72
  9. package/CHANGELOG.md +17 -0
  10. package/Gruntfile.js +1 -8
  11. package/bower.json +1 -2
  12. package/dist/less-rolledup.js +8572 -0
  13. package/dist/less.js +8 -3
  14. package/dist/less.min.js +3 -3
  15. package/lib/less/index.js +1 -1
  16. package/lib/less/tree/import.js +6 -1
  17. package/package.json +1 -1
  18. package/test/browser/less.js +11 -12
  19. package/test/less/errors/parse-error-media-no-block-3.less +3 -3
  20. package/test/less/no-output.less +1 -1
  21. package/test/less/sourcemaps/imported.css +6 -6
  22. package/test/less-bom/errors/at-rules-undefined-var.txt +4 -4
  23. package/test/less-bom/errors/css-guard-default-func.txt +4 -4
  24. package/test/less-bom/errors/javascript-undefined-var.txt +4 -4
  25. package/test/less-bom/errors/mixins-guards-default-func-1.txt +4 -4
  26. package/test/less-bom/errors/mixins-guards-default-func-2.txt +4 -4
  27. package/test/less-bom/errors/mixins-guards-default-func-3.txt +4 -4
  28. package/test/less-bom/errors/parse-error-media-no-block-3.less +3 -3
  29. package/test/less-bom/errors/percentage-non-number-argument.less +3 -0
  30. package/test/less-bom/errors/percentage-non-number-argument.txt +4 -0
  31. package/test/less-bom/errors/property-interp-not-defined.txt +2 -2
  32. package/test/less-bom/import/import-inline-invalid-css.less +1 -0
  33. package/test/less-bom/import/import-reference.less +10 -1
  34. package/test/less-bom/import-reference.less +2 -0
  35. package/test/less-bom/mixins-args.less +48 -0
  36. package/test/less-bom/mixins-guards.less +9 -0
  37. package/test/less-bom/no-output.less +1 -1
  38. package/test/less-bom/sourcemaps/imported.css +6 -6
  39. package/test.less +1 -0
  40. package/.idea/codeStyleSettings.xml +0 -13
  41. package/.idea/encodings.xml +0 -5
  42. package/.idea/inspectionProfiles/Project_Default.xml +0 -8
  43. package/.idea/inspectionProfiles/profiles_settings.xml +0 -7
  44. package/.idea/jsLinters/jscs.xml +0 -4
  45. package/.idea/jsLinters/jshint.xml +0 -70
  46. package/.idea/libraries/sass_stdlib.xml +0 -8
  47. package/.idea/scopes/scope_settings.xml +0 -5
  48. package/projectFilesBackup/.idea/libraries/sass_stdlib.xml +0 -8
  49. package/test/sourcemaps/maps/import-map.map +0 -1
@@ -1,4 +1,4 @@
1
- @media (min-width: 500px) {
2
- .sometimes-big {
3
- font-size: 5000px;
1
+ @media (min-width: 500px) {
2
+ .sometimes-big {
3
+ font-size: 5000px;
4
4
  }
@@ -1,2 +1,2 @@
1
- .mixin() {
1
+ .mixin() {
2
2
  }
@@ -1,7 +1,7 @@
1
- /*comments*/
2
- .unused-css {
3
- color: white;
4
- }
5
- .imported {
6
- color: black;
1
+ /*comments*/
2
+ .unused-css {
3
+ color: white;
4
+ }
5
+ .imported {
6
+ color: black;
7
7
  }
@@ -1,4 +1,4 @@
1
- NameError: variable @name is undefined in {path}at-rules-undefined-var.less on line 2, column 12:
2
- 1
3
- 2 @keyframes @name {
4
- 3 50% {width: 20px;}
1
+ NameError: variable @name is undefined in {path}at-rules-undefined-var.less on line 2, column 12:
2
+ 1
3
+ 2 @keyframes @name {
4
+ 3 50% {width: 20px;}
@@ -1,4 +1,4 @@
1
- SyntaxError: error evaluating function `default`: it is currently only allowed in parametric mixin guards, in {path}css-guard-default-func.less on line 2, column 16:
2
- 1
3
- 2 selector when (default()) {
4
- 3 color: red;
1
+ SyntaxError: error evaluating function `default`: it is currently only allowed in parametric mixin guards, in {path}css-guard-default-func.less on line 2, column 16:
2
+ 1
3
+ 2 selector when (default()) {
4
+ 3 color: red;
@@ -1,4 +1,4 @@
1
- NameError: variable @b is undefined in {path}javascript-undefined-var.less on line 2, column 9:
2
- 1 .scope {
3
- 2 @a: `@{b}`;
4
- 3 }
1
+ NameError: variable @b is undefined in {path}javascript-undefined-var.less on line 2, column 9:
2
+ 1 .scope {
3
+ 2 @a: `@{b}`;
4
+ 3 }
@@ -1,4 +1,4 @@
1
- RuntimeError: Ambiguous use of `default()` found when matching for `.m(1, 2)` in {path}mixins-guards-default-func-1.less on line 8, column 5:
2
- 7 .m(1, 1);
3
- 8 .m(1, 2);
4
- 9 }
1
+ RuntimeError: Ambiguous use of `default()` found when matching for `.m(1, 2)` in {path}mixins-guards-default-func-1.less on line 8, column 5:
2
+ 7 .m(1, 1);
3
+ 8 .m(1, 2);
4
+ 9 }
@@ -1,4 +1,4 @@
1
- RuntimeError: Ambiguous use of `default()` found when matching for `.m(3)` in {path}mixins-guards-default-func-2.less on line 8, column 5:
2
- 7 .m(2);
3
- 8 .m(3);
4
- 9 }
1
+ RuntimeError: Ambiguous use of `default()` found when matching for `.m(3)` in {path}mixins-guards-default-func-2.less on line 8, column 5:
2
+ 7 .m(2);
3
+ 8 .m(3);
4
+ 9 }
@@ -1,4 +1,4 @@
1
- RuntimeError: Ambiguous use of `default()` found when matching for `.m(2)` in {path}mixins-guards-default-func-3.less on line 8, column 5:
2
- 7 .m(1);
3
- 8 .m(2);
4
- 9 }
1
+ RuntimeError: Ambiguous use of `default()` found when matching for `.m(2)` in {path}mixins-guards-default-func-3.less on line 8, column 5:
2
+ 7 .m(1);
3
+ 8 .m(2);
4
+ 9 }
@@ -1,4 +1,4 @@
1
- @media (min-width: 500px) {
2
- .sometimes-big {
3
- font-size: 5000px;
1
+ @media (min-width: 500px) {
2
+ .sometimes-big {
3
+ font-size: 5000px;
4
4
  }
@@ -0,0 +1,3 @@
1
+ div {
2
+ percentage: percentage(16/17);
3
+ }
@@ -0,0 +1,4 @@
1
+ ArgumentError: error evaluating function `percentage`: argument must be a number in {path}percentage-non-number-argument.less on line 2, column 15:
2
+ 1 div {
3
+ 2 percentage: percentage(16/17);
4
+ 3 }
@@ -1,2 +1,2 @@
1
- NameError: variable @color is undefined in {path}property-interp-not-defined.less on line 1, column 12:
2
- 1 a {outline-@{color}: green}
1
+ NameError: variable @color is undefined in {path}property-interp-not-defined.less on line 1, column 12:
2
+ 1 a {outline-@{color}: green}
@@ -0,0 +1 @@
1
+ @import (inline) "invalid-css.less";
@@ -37,7 +37,7 @@
37
37
 
38
38
  .zz {
39
39
  .y {
40
- pulled-in: yes;
40
+ pulled-in: yes /* inline comment survives */;
41
41
  }
42
42
  /* comment pulled in */
43
43
  }
@@ -86,4 +86,13 @@
86
86
  }
87
87
  @rules1: {property: value;};
88
88
  @rules2: {property: value;};
89
+ }
90
+
91
+ @import (inline, multiple) "invalid-css.less";
92
+ @import "import-inline-invalid-css.less";
93
+ .print-referenced-import-inline() {
94
+ div {
95
+ @import (inline, multiple) "invalid-css.less";
96
+ }
97
+ @import (inline, multiple) "invalid-css.less";
89
98
  }
@@ -22,3 +22,5 @@
22
22
  }
23
23
  .mixin-with-nested-selectors();
24
24
  .mixin-with-directives(some-name);
25
+
26
+ .print-referenced-import-inline();
@@ -212,4 +212,52 @@ body {
212
212
 
213
213
  div {
214
214
  .test-calling-one-arg-mixin(1);
215
+ }
216
+
217
+ mixins-args-expand-op- {
218
+ @x: 1, 2, 3;
219
+ @y: 4 5 6;
220
+
221
+ &1 {.m3(@x...)}
222
+ &2 {.m3(@y...)}
223
+ &3 {.wr(a, b, c)}
224
+ &4 {.wr(a; b; c, d)}
225
+ &5 {.wr(@x...)}
226
+ &6 {.m4(0; @x...)}
227
+ &7 {.m4(@x..., @a: 0)}
228
+ &8 {.m4(@b: 1.5; @x...)}
229
+ &9 {.aa(@y, @x..., and again, @y...)}
230
+
231
+ .m3(@a, @b, @c) {
232
+ m3: @a, @b, @c;
233
+ }
234
+
235
+ .m4(@a, @b, @c, @d) {
236
+ m4: @a, @b, @c, @d;
237
+ }
238
+
239
+ .wr(@a...) {
240
+ &a {.m3(@a...)}
241
+ &b {.m4(0, @a...)}
242
+ &c {.m4(@a..., 4)}
243
+ }
244
+
245
+ .aa(@a...) {
246
+ aa: @a;
247
+ a4: extract(@a, 5);
248
+ a8: extract(@a, 8);
249
+ }
250
+ }
251
+ #test-mixin-matching-when-default-2645 {
252
+ .mixin(@height) {
253
+ height: @height;
254
+ }
255
+
256
+ .mixin(@width, @height: 10px) {
257
+ width: @width;
258
+
259
+ .mixin(@height: @height);
260
+ }
261
+
262
+ .mixin(@height: 20px);
215
263
  }
@@ -269,3 +269,12 @@
269
269
  #guarded-deeper {
270
270
  #top > #deeper > .mixin(1);
271
271
  }
272
+
273
+ // namespaced & guarded mixin in root
274
+ // outputs nothing but should pass:
275
+
276
+ @guarded-mixin-for-root: true;
277
+ #ns {
278
+ .guarded-mixin-for-root() when (@guarded-mixin-for-root) {}
279
+ }
280
+ #ns > .guarded-mixin-for-root();
@@ -1,2 +1,2 @@
1
- .mixin() {
1
+ .mixin() {
2
2
  }
@@ -1,7 +1,7 @@
1
- /*comments*/
2
- .unused-css {
3
- color: white;
4
- }
5
- .imported {
6
- color: black;
1
+ /*comments*/
2
+ .unused-css {
3
+ color: white;
4
+ }
5
+ .imported {
6
+ color: black;
7
7
  }
package/test.less ADDED
@@ -0,0 +1 @@
1
+ @import (inline) url(https://fonts.googleapis.com/css?family=Lato);
@@ -1,13 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectCodeStyleSettingsManager">
4
- <option name="PER_PROJECT_SETTINGS">
5
- <value>
6
- <XML>
7
- <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
8
- </XML>
9
- </value>
10
- </option>
11
- <option name="USE_PER_PROJECT_SETTINGS" value="true" />
12
- </component>
13
- </project>
@@ -1,5 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
4
- </project>
5
-
@@ -1,8 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0" is_locked="false">
3
- <option name="myName" value="Project Default" />
4
- <option name="myLocal" value="false" />
5
- <inspection_tool class="JSHint" enabled="true" level="ERROR" enabled_by_default="true" />
6
- <inspection_tool class="Jscs" enabled="true" level="ERROR" enabled_by_default="true" />
7
- </profile>
8
- </component>
@@ -1,7 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <settings>
3
- <option name="PROJECT_PROFILE" value="Project Default" />
4
- <option name="USE_PROJECT_PROFILE" value="true" />
5
- <version value="1.0" />
6
- </settings>
7
- </component>
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="JscsConfiguration" jscs-preset="" />
4
- </project>
@@ -1,70 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="JSHintConfiguration" version="1.0.0" use-config-file="true">
4
- <option asi="false" />
5
- <option bitwise="true" />
6
- <option boss="false" />
7
- <option browser="false" />
8
- <option camelcase="false" />
9
- <option couch="false" />
10
- <option curly="true" />
11
- <option debug="false" />
12
- <option devel="false" />
13
- <option dojo="false" />
14
- <option eqeqeq="true" />
15
- <option eqnull="false" />
16
- <option es3="false" />
17
- <option esnext="false" />
18
- <option evil="false" />
19
- <option expr="false" />
20
- <option forin="true" />
21
- <option freeze="false" />
22
- <option funcscope="false" />
23
- <option gcl="false" />
24
- <option globalstrict="false" />
25
- <option immed="false" />
26
- <option iterator="false" />
27
- <option jquery="false" />
28
- <option lastsemic="false" />
29
- <option latedef="false" />
30
- <option laxbreak="false" />
31
- <option laxcomma="false" />
32
- <option loopfunc="false" />
33
- <option maxerr="200" />
34
- <option mootools="false" />
35
- <option moz="false" />
36
- <option multistr="false" />
37
- <option newcap="false" />
38
- <option noarg="true" />
39
- <option node="true" />
40
- <option noempty="true" />
41
- <option nomen="false" />
42
- <option nonbsp="false" />
43
- <option nonew="true" />
44
- <option nonstandard="false" />
45
- <option notypeof="false" />
46
- <option noyield="false" />
47
- <option onevar="false" />
48
- <option passfail="false" />
49
- <option phantom="false" />
50
- <option plusplus="false" />
51
- <option proto="false" />
52
- <option prototypejs="false" />
53
- <option quotmark="false" />
54
- <option rhino="false" />
55
- <option scripturl="false" />
56
- <option shadow="false" />
57
- <option smarttabs="false" />
58
- <option strict="false" />
59
- <option sub="false" />
60
- <option supernew="false" />
61
- <option trailing="false" />
62
- <option undef="true" />
63
- <option unused="false" />
64
- <option validthis="false" />
65
- <option white="false" />
66
- <option worker="false" />
67
- <option wsh="false" />
68
- <option yui="false" />
69
- </component>
70
- </project>
@@ -1,8 +0,0 @@
1
- <component name="libraryTable">
2
- <library name="sass-stdlib">
3
- <CLASSES />
4
- <SOURCES>
5
- <root url="file://$APPLICATION_HOME_DIR$/plugins/sass/lib/stubs/sass_functions.scss" />
6
- </SOURCES>
7
- </library>
8
- </component>
@@ -1,5 +0,0 @@
1
- <component name="DependencyValidationManager">
2
- <state>
3
- <option name="SKIP_IMPORT_STATEMENTS" value="false" />
4
- </state>
5
- </component>
@@ -1,8 +0,0 @@
1
- <component name="libraryTable">
2
- <library name="sass-stdlib">
3
- <CLASSES />
4
- <SOURCES>
5
- <root url="file://$APPLICATION_HOME_DIR$/plugins/sass/lib/stubs/sass_functions.scss" />
6
- </SOURCES>
7
- </library>
8
- </component>
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../less/import.less","../../less/import/import-test-b.less","../../less/import/import-test-e.less","../../less/import/import-test-c.less","../../less/import/deeper/deeper-2/url-import-2.less","../../less/import/import-test-d.css"],"names":[],"mappings":"AA0BA,SAAS;;6DAxBqE;YAGlE,sBAAqC;AAEjD;ECFE,YAAA;EACA,UAAA;EDGA,WAAA;EACA,WAAA;;mBAE0D;EEX5D;IAAO,WAAA;;;ACEP;EACE,UAAA;;AFAF;EACE,YAAA;EACA,UAAA;;AGNF;EACE,UAAA;;mBJe+E;EKhBjF;IAAO,aAAA;;;mBLkBgE;EEjBvE;IAAO,WAAA;;;mBFmB+E;EKpBtF;IAAO,aAAA;;;AL0BP;EEzBA;IAAO,WAAA","file":"..\\import.css"}