less 3.6.0 → 3.8.1

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 (142) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/Gruntfile.js +43 -6
  3. package/bin/lessc +32 -3
  4. package/dist/less.js +2810 -326
  5. package/dist/less.min.js +7 -7
  6. package/lib/less/constants.js +13 -0
  7. package/lib/less/contexts.js +45 -10
  8. package/lib/less/default-options.js +12 -4
  9. package/lib/less/functions/color.js +84 -41
  10. package/lib/less/functions/data-uri.js +1 -1
  11. package/lib/less/functions/index.js +1 -0
  12. package/lib/less/functions/list.js +101 -0
  13. package/lib/less/functions/types.js +1 -19
  14. package/lib/less/import-manager.js +3 -3
  15. package/lib/less/index.js +1 -1
  16. package/lib/less/parse.js +3 -3
  17. package/lib/less/parser/parser.js +31 -13
  18. package/lib/less/render.js +2 -2
  19. package/lib/less/source-map-output.js +2 -2
  20. package/lib/less/tree/color.js +58 -18
  21. package/lib/less/tree/declaration.js +11 -7
  22. package/lib/less/tree/expression.js +7 -3
  23. package/lib/less/tree/import.js +9 -8
  24. package/lib/less/tree/mixin-definition.js +1 -1
  25. package/lib/less/tree/operation.js +10 -4
  26. package/lib/less/tree/url.js +12 -8
  27. package/lib/less/utils.js +54 -19
  28. package/lib/less-browser/add-default-options.js +3 -3
  29. package/lib/less-browser/index.js +9 -2
  30. package/lib/less-node/image-size.js +1 -1
  31. package/lib/less-node/lessc-helper.js +12 -4
  32. package/package.json +5 -2
  33. package/test/browser/css/rewrite-urls/urls.css +36 -0
  34. package/test/browser/css/rootpath-rewrite-urls/urls.css +35 -0
  35. package/test/browser/less/rewrite-urls/urls.less +34 -0
  36. package/test/browser/less/rootpath-rewrite-urls/urls.less +33 -0
  37. package/test/browser/less.js +2810 -326
  38. package/test/browser/runner-browser-options.js +1 -1
  39. package/test/browser/runner-errors-options.js +1 -1
  40. package/test/browser/runner-legacy-options.js +1 -1
  41. package/test/browser/runner-rewrite-urls-options.js +3 -0
  42. package/test/browser/runner-rewrite-urls-spec.js +3 -0
  43. package/test/browser/runner-rootpath-relative-spec.js +1 -1
  44. package/test/browser/runner-rootpath-rewrite-urls-options.js +4 -0
  45. package/test/browser/runner-rootpath-rewrite-urls-spec.js +3 -0
  46. package/test/css/calc.css +2 -2
  47. package/test/css/colors.css +20 -3
  48. package/test/css/css-3.css +0 -8
  49. package/test/css/css-escapes.css +3 -0
  50. package/test/css/functions-each.css +48 -0
  51. package/test/css/functions.css +6 -4
  52. package/test/css/math/parens-division/media-math.css +10 -0
  53. package/test/css/math/parens-division/mixins-args.css +169 -0
  54. package/test/css/math/parens-division/new-division.css +16 -0
  55. package/test/css/math/parens-division/parens.css +37 -0
  56. package/test/css/math/strict/css.css +95 -0
  57. package/test/css/math/strict/media-math.css +10 -0
  58. package/test/css/math/strict/mixins-args.css +169 -0
  59. package/test/css/math/strict/parens.css +37 -0
  60. package/test/css/{strict-math → math/strict-legacy}/css.css +0 -0
  61. package/test/css/math/strict-legacy/media-math.css +10 -0
  62. package/test/css/{strict-math → math/strict-legacy}/mixins-args.css +0 -0
  63. package/test/css/{strict-math → math/strict-legacy}/parens.css +5 -1
  64. package/test/css/no-strict-math/no-sm-operations.css +3 -0
  65. package/test/css/rewrite-urls-all/rewrite-urls-all.css +17 -0
  66. package/test/css/rewrite-urls-local/rewrite-urls-local.css +17 -0
  67. package/test/css/rootpath-rewrite-urls-all/rootpath-rewrite-urls-all.css +17 -0
  68. package/test/css/rootpath-rewrite-urls-local/rootpath-rewrite-urls-local.css +17 -0
  69. package/test/css/static-urls/urls.css +2 -2
  70. package/test/css/urls.css +2 -2
  71. package/test/index.js +28 -15
  72. package/test/less/colors.less +18 -0
  73. package/test/less/css-3.less +0 -9
  74. package/test/less/css-escapes.less +4 -0
  75. package/test/less/errors/color-func-invalid-color.txt +1 -1
  76. package/test/less/errors/mixin-not-defined-2.less +7 -0
  77. package/test/less/errors/mixin-not-defined-2.txt +4 -0
  78. package/test/less/functions-each.less +81 -0
  79. package/test/less/functions.less +14 -2
  80. package/test/less/math/parens-division/media-math.less +9 -0
  81. package/test/less/math/parens-division/mixins-args.less +264 -0
  82. package/test/less/math/parens-division/new-division.less +17 -0
  83. package/test/less/{strict-math → math/parens-division}/parens.less +2 -1
  84. package/test/less/math/strict/css.less +108 -0
  85. package/test/less/math/strict/media-math.less +9 -0
  86. package/test/less/math/strict/mixins-args.less +264 -0
  87. package/test/less/math/strict/parens.less +46 -0
  88. package/test/less/{strict-math → math/strict-legacy}/css.less +0 -0
  89. package/test/less/math/strict-legacy/media-math.less +9 -0
  90. package/test/less/{strict-math → math/strict-legacy}/mixins-args.less +0 -0
  91. package/test/less/math/strict-legacy/parens.less +50 -0
  92. package/test/less/no-strict-math/no-sm-operations.less +3 -0
  93. package/test/less/rewrite-urls-all/folder/file.less +8 -0
  94. package/test/less/rewrite-urls-all/rewrite-urls-all.less +11 -0
  95. package/test/less/rewrite-urls-local/folder/file.less +8 -0
  96. package/test/less/rewrite-urls-local/rewrite-urls-local.less +11 -0
  97. package/test/less/rootpath-rewrite-urls-all/folder/file.less +8 -0
  98. package/test/less/rootpath-rewrite-urls-all/rootpath-rewrite-urls-all.less +11 -0
  99. package/test/less/rootpath-rewrite-urls-local/folder/file.less +8 -0
  100. package/test/less/rootpath-rewrite-urls-local/rootpath-rewrite-urls-local.less +11 -0
  101. package/test/less/sourcemaps/custom-props.less +8 -0
  102. package/test/less-bom/colors.less +18 -0
  103. package/test/less-bom/css-3.less +0 -9
  104. package/test/less-bom/css-escapes.less +4 -0
  105. package/test/less-bom/errors/color-func-invalid-color.txt +1 -1
  106. package/test/less-bom/errors/mixin-not-defined-2.less +7 -0
  107. package/test/less-bom/errors/mixin-not-defined-2.txt +4 -0
  108. package/test/less-bom/functions-each.less +81 -0
  109. package/test/less-bom/functions.less +14 -2
  110. package/test/less-bom/math/parens-division/media-math.less +9 -0
  111. package/test/less-bom/math/parens-division/mixins-args.less +264 -0
  112. package/test/less-bom/math/parens-division/new-division.less +17 -0
  113. package/test/less-bom/{strict-math → math/parens-division}/parens.less +2 -1
  114. package/test/less-bom/math/strict/css.less +108 -0
  115. package/test/less-bom/math/strict/media-math.less +9 -0
  116. package/test/less-bom/math/strict/mixins-args.less +264 -0
  117. package/test/less-bom/math/strict/parens.less +46 -0
  118. package/test/less-bom/{strict-math → math/strict-legacy}/css.less +0 -0
  119. package/test/less-bom/math/strict-legacy/media-math.less +9 -0
  120. package/test/less-bom/{strict-math → math/strict-legacy}/mixins-args.less +0 -0
  121. package/test/less-bom/math/strict-legacy/parens.less +50 -0
  122. package/test/less-bom/no-strict-math/no-sm-operations.less +3 -0
  123. package/test/less-bom/rewrite-urls-all/folder/file.less +8 -0
  124. package/test/less-bom/rewrite-urls-all/rewrite-urls-all.less +11 -0
  125. package/test/less-bom/rewrite-urls-local/folder/file.less +8 -0
  126. package/test/less-bom/rewrite-urls-local/rewrite-urls-local.less +11 -0
  127. package/test/less-bom/rootpath-rewrite-urls-all/folder/file.less +8 -0
  128. package/test/less-bom/rootpath-rewrite-urls-all/rootpath-rewrite-urls-all.less +11 -0
  129. package/test/less-bom/rootpath-rewrite-urls-local/folder/file.less +8 -0
  130. package/test/less-bom/rootpath-rewrite-urls-local/rootpath-rewrite-urls-local.less +11 -0
  131. package/test/less-bom/sourcemaps/custom-props.less +8 -0
  132. package/test/less-test.js +26 -12
  133. package/test/sourcemaps/custom-props.json +1 -0
  134. package/.npmignore +0 -8
  135. package/test/less/errors/color-invalid-hex-code.less +0 -4
  136. package/test/less/errors/color-invalid-hex-code.txt +0 -4
  137. package/test/less/errors/color-invalid-hex-code2.less +0 -4
  138. package/test/less/errors/color-invalid-hex-code2.txt +0 -4
  139. package/test/less-bom/errors/color-invalid-hex-code.less +0 -4
  140. package/test/less-bom/errors/color-invalid-hex-code.txt +0 -4
  141. package/test/less-bom/errors/color-invalid-hex-code2.less +0 -4
  142. package/test/less-bom/errors/color-invalid-hex-code2.txt +0 -4
package/.npmignore DELETED
@@ -1,8 +0,0 @@
1
- .gitattributes
2
- build/
3
- .grunt/
4
- benchmark/
5
- test/
6
- # re-include test files as they can be useful for plugins that do testing
7
- !test/*.js
8
- tmp/
@@ -1,4 +0,0 @@
1
- .a {
2
- @wrongHEXColorCode: #DCALLB;
3
- color: @wrongHEXColorCode;
4
- }
@@ -1,4 +0,0 @@
1
- SyntaxError: Invalid HEX color code in {path}color-invalid-hex-code.less on line 2, column 29:
2
- 1 .a {
3
- 2 @wrongHEXColorCode: #DCALLB;
4
- 3 color: @wrongHEXColorCode;
@@ -1,4 +0,0 @@
1
- .a {
2
- @wrongHEXColorCode: #fffblack;
3
- color: @wrongHEXColorCode;
4
- }
@@ -1,4 +0,0 @@
1
- SyntaxError: Invalid HEX color code in {path}color-invalid-hex-code2.less on line 2, column 29:
2
- 1 .a {
3
- 2 @wrongHEXColorCode: #fffblack;
4
- 3 color: @wrongHEXColorCode;
@@ -1,4 +0,0 @@
1
- .a {
2
- @wrongHEXColorCode: #DCALLB;
3
- color: @wrongHEXColorCode;
4
- }
@@ -1,4 +0,0 @@
1
- SyntaxError: Invalid HEX color code in {path}color-invalid-hex-code.less on line 2, column 29:
2
- 1 .a {
3
- 2 @wrongHEXColorCode: #DCALLB;
4
- 3 color: @wrongHEXColorCode;
@@ -1,4 +0,0 @@
1
- .a {
2
- @wrongHEXColorCode: #fffblack;
3
- color: @wrongHEXColorCode;
4
- }
@@ -1,4 +0,0 @@
1
- SyntaxError: Invalid HEX color code in {path}color-invalid-hex-code2.less on line 2, column 29:
2
- 1 .a {
3
- 2 @wrongHEXColorCode: #fffblack;
4
- 3 color: @wrongHEXColorCode;