less 1.7.0 → 1.7.5

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 (109) hide show
  1. package/.grunt/grunt-contrib-jasmine/es5-shim.js +1360 -0
  2. package/.idea/jsLibraryMappings.xml +0 -1
  3. package/.idea/workspace.xml +182 -183
  4. package/.travis.yml +0 -1
  5. package/CHANGELOG.md +60 -2
  6. package/CONTRIBUTING.md +1 -1
  7. package/Gruntfile.js +12 -24
  8. package/LICENSE +0 -2
  9. package/README.md +5 -3
  10. package/benchmark/less-benchmark.js +1 -2
  11. package/bin/lessc +13 -11
  12. package/bower.json +2 -2
  13. package/build/rhino-modules.js +1 -1
  14. package/dist/less-1.7.0.js +59 -59
  15. package/dist/less-1.7.0.min.js +12 -12
  16. package/dist/less-1.7.1.js +7936 -0
  17. package/dist/less-1.7.1.min.js +16 -0
  18. package/dist/less-1.7.2.js +7938 -0
  19. package/dist/less-1.7.2.min.js +16 -0
  20. package/dist/less-1.7.3.js +7942 -0
  21. package/dist/less-1.7.3.min.js +16 -0
  22. package/dist/less-1.7.4.js +7979 -0
  23. package/dist/less-1.7.4.min.js +16 -0
  24. package/dist/less-1.7.5.js +8008 -0
  25. package/dist/less-1.7.5.min.js +16 -0
  26. package/dist/less-rhino-1.7.0.js +48 -48
  27. package/dist/less-rhino-1.7.1.js +9311 -0
  28. package/dist/less-rhino-1.7.2.js +9313 -0
  29. package/dist/less-rhino-1.7.3.js +9317 -0
  30. package/dist/less-rhino-1.7.4.js +9354 -0
  31. package/dist/less-rhino-1.7.5.js +9383 -0
  32. package/dist/lessc-rhino-1.7.0.js +2 -2
  33. package/dist/lessc-rhino-1.7.1.js +449 -0
  34. package/dist/lessc-rhino-1.7.2.js +449 -0
  35. package/dist/lessc-rhino-1.7.3.js +449 -0
  36. package/dist/lessc-rhino-1.7.4.js +449 -0
  37. package/dist/lessc-rhino-1.7.5.js +449 -0
  38. package/lib/less/browser.js +14 -9
  39. package/lib/less/env.js +2 -0
  40. package/lib/less/fs.js +10 -0
  41. package/lib/less/functions.js +41 -38
  42. package/lib/less/import-visitor.js +9 -7
  43. package/lib/less/index.js +30 -18
  44. package/lib/less/lessc_helper.js +1 -0
  45. package/lib/less/parser/parser.js.orig +1747 -0
  46. package/lib/less/parser.js +81 -40
  47. package/lib/less/rhino.js +3 -3
  48. package/lib/less/source-map-output.js +1 -1
  49. package/lib/less/to-css-visitor.js +3 -0
  50. package/lib/less/tree/anonymous.js +7 -3
  51. package/lib/less/tree/directive.js +6 -0
  52. package/lib/less/tree/element.js +6 -22
  53. package/lib/less/tree/import.js +1 -1
  54. package/lib/less/tree/mixin.js +4 -3
  55. package/lib/less/tree/quoted.js +12 -4
  56. package/lib/less/tree/rule.js +7 -4
  57. package/lib/less/tree/rule.js.orig +164 -0
  58. package/lib/less/tree/ruleset.js +27 -2
  59. package/lib/less/tree/selector.js +1 -1
  60. package/lib/less/tree.js +2 -2
  61. package/package.json +13 -12
  62. package/test/browser/less.js +7317 -6931
  63. package/test/css/comments.css +8 -0
  64. package/test/css/css-3.css +9 -0
  65. package/test/css/functions.css +8 -8
  66. package/test/css/import-inline.css +4 -1
  67. package/test/css/import.css +6 -0
  68. package/test/css/javascript.css +5 -0
  69. package/test/css/mixins-guards.css +14 -3
  70. package/test/css/mixins.css +3 -0
  71. package/test/css/property-name-interp.css +1 -0
  72. package/test/css/urls.css +6 -0
  73. package/test/index.js +1 -1
  74. package/test/less/comments.less +14 -1
  75. package/test/less/css-3.less +12 -1
  76. package/test/less/errors/color-invalid-hex-code.less +3 -0
  77. package/test/less/errors/color-invalid-hex-code.txt +4 -0
  78. package/test/less/errors/color-invalid-hex-code2.less +3 -0
  79. package/test/less/errors/color-invalid-hex-code2.txt +4 -0
  80. package/test/less/errors/import-malformed.less +1 -0
  81. package/test/less/errors/import-malformed.txt +3 -0
  82. package/test/less/errors/import-no-semi.txt +1 -1
  83. package/test/less/errors/javascript-error.less +1 -1
  84. package/test/less/errors/javascript-error.txt +2 -2
  85. package/test/less/import-inline.less +1 -0
  86. package/test/less/import.less +8 -1
  87. package/test/less/javascript.less +9 -0
  88. package/test/less/mixins-guards.less +17 -3
  89. package/test/less/mixins.less +4 -0
  90. package/test/less/property-name-interp.less +4 -1
  91. package/test/less/property-name-interp.less.orig +59 -0
  92. package/test/less/urls.less +12 -0
  93. package/test/less-test.js +7 -8
  94. package/test/modify-vars.js +17 -0
  95. package/test/sourcemaps/basic.json +1 -1
  96. package/tmp/browser/test-runner-main.html +4 -0
  97. package/tmp/less.js +8295 -0
  98. package/build/README.md +0 -51
  99. package/tmp/browser/test-postProcessor.html +0 -59
  100. package/tmp/browser/test-runner-browser.html +0 -59
  101. package/tmp/browser/test-runner-errors.html +0 -267
  102. package/tmp/browser/test-runner-global-vars.html +0 -59
  103. package/tmp/browser/test-runner-legacy.html +0 -59
  104. package/tmp/browser/test-runner-modify-vars.html +0 -59
  105. package/tmp/browser/test-runner-no-js-errors.html +0 -59
  106. package/tmp/browser/test-runner-production.html +0 -55
  107. package/tmp/browser/test-runner-relative-urls.html +0 -59
  108. package/tmp/browser/test-runner-rootpath-relative.html +0 -59
  109. package/tmp/browser/test-runner-rootpath.html +0 -59
@@ -1,17 +1,17 @@
1
- /*!
2
- * LESS - Leaner CSS v1.7.0
3
- * http://lesscss.org
4
- *
5
- * Copyright (c) 2009-2014, Alexis Sellier <self@cloudhead.net>
6
- * Licensed under the Apache v2 License.
7
- *
8
- */
9
-
10
- /** * @license Apache v2
11
- */
12
-
13
-
14
-
1
+ /*!
2
+ * LESS - Leaner CSS v1.7.0
3
+ * http://lesscss.org
4
+ *
5
+ * Copyright (c) 2009-2014, Alexis Sellier <self@cloudhead.net>
6
+ * Licensed under the Apache v2 License.
7
+ *
8
+ */
9
+
10
+ /** * @license Apache v2
11
+ */
12
+
13
+
14
+
15
15
  (function (window, undefined) {//
16
16
  // Stub out `require` in the browser
17
17
  //
@@ -19,12 +19,12 @@ function require(arg) {
19
19
  return window.less[arg.split('/')[1]];
20
20
  };
21
21
 
22
-
22
+
23
23
  if (typeof(window.less) === 'undefined' || typeof(window.less.nodeType) !== 'undefined') { window.less = {}; }
24
24
  less = window.less;
25
25
  tree = window.less.tree = {};
26
26
  less.mode = 'browser';
27
-
27
+
28
28
  var less, tree;
29
29
 
30
30
  // Node.js does not have a header file added which defines less
@@ -2093,7 +2093,7 @@ less.Parser.serializeVars = function(vars) {
2093
2093
 
2094
2094
  return s;
2095
2095
  };
2096
-
2096
+
2097
2097
  (function (tree) {
2098
2098
 
2099
2099
  tree.functions = {
@@ -2862,7 +2862,7 @@ tree.functionCall = function(env, currentFileInfo) {
2862
2862
  tree.functionCall.prototype = tree.functions;
2863
2863
 
2864
2864
  })(require('./tree'));
2865
-
2865
+
2866
2866
  (function (tree) {
2867
2867
  tree.colors = {
2868
2868
  'aliceblue':'#f0f8ff',
@@ -3014,7 +3014,7 @@ tree.functionCall.prototype = tree.functions;
3014
3014
  'yellowgreen':'#9acd32'
3015
3015
  };
3016
3016
  })(require('./tree'));
3017
-
3017
+
3018
3018
  (function (tree) {
3019
3019
 
3020
3020
  tree.debugInfo = function(env, ctx, lineSeperator) {
@@ -3112,7 +3112,7 @@ tree.outputRuleset = function (env, output, rules) {
3112
3112
  };
3113
3113
 
3114
3114
  })(require('./tree'));
3115
-
3115
+
3116
3116
  (function (tree) {
3117
3117
 
3118
3118
  tree.Alpha = function (val) {
@@ -3142,7 +3142,7 @@ tree.Alpha.prototype = {
3142
3142
  };
3143
3143
 
3144
3144
  })(require('../tree'));
3145
-
3145
+
3146
3146
  (function (tree) {
3147
3147
 
3148
3148
  tree.Anonymous = function (string, index, currentFileInfo, mapLines) {
@@ -3177,7 +3177,7 @@ tree.Anonymous.prototype = {
3177
3177
  };
3178
3178
 
3179
3179
  })(require('../tree'));
3180
-
3180
+
3181
3181
  (function (tree) {
3182
3182
 
3183
3183
  tree.Assignment = function (key, val) {
@@ -3207,7 +3207,7 @@ tree.Assignment.prototype = {
3207
3207
  };
3208
3208
 
3209
3209
  })(require('../tree'));
3210
-
3210
+
3211
3211
  (function (tree) {
3212
3212
 
3213
3213
  //
@@ -3279,7 +3279,7 @@ tree.Call.prototype = {
3279
3279
  };
3280
3280
 
3281
3281
  })(require('../tree'));
3282
-
3282
+
3283
3283
  (function (tree) {
3284
3284
  //
3285
3285
  // RGB Colors - #ff0014, #eee
@@ -3469,7 +3469,7 @@ function clamp(v, max) {
3469
3469
  }
3470
3470
 
3471
3471
  })(require('../tree'));
3472
-
3472
+
3473
3473
  (function (tree) {
3474
3474
 
3475
3475
  tree.Comment = function (value, silent, index, currentFileInfo) {
@@ -3498,7 +3498,7 @@ tree.Comment.prototype = {
3498
3498
  };
3499
3499
 
3500
3500
  })(require('../tree'));
3501
-
3501
+
3502
3502
  (function (tree) {
3503
3503
 
3504
3504
  tree.Condition = function (op, l, r, i, negate) {
@@ -3548,7 +3548,7 @@ tree.Condition.prototype = {
3548
3548
  };
3549
3549
 
3550
3550
  })(require('../tree'));
3551
-
3551
+
3552
3552
  (function (tree) {
3553
3553
 
3554
3554
  tree.DetachedRuleset = function (ruleset, frames) {
@@ -3569,7 +3569,7 @@ tree.DetachedRuleset.prototype = {
3569
3569
  }
3570
3570
  };
3571
3571
  })(require('../tree'));
3572
-
3572
+
3573
3573
  (function (tree) {
3574
3574
 
3575
3575
  //
@@ -3894,7 +3894,7 @@ tree.Unit.prototype = {
3894
3894
  };
3895
3895
 
3896
3896
  })(require('../tree'));
3897
-
3897
+
3898
3898
  (function (tree) {
3899
3899
 
3900
3900
  tree.Directive = function (name, value, rules, index, currentFileInfo, debugInfo) {
@@ -3964,7 +3964,7 @@ tree.Directive.prototype = {
3964
3964
  };
3965
3965
 
3966
3966
  })(require('../tree'));
3967
-
3967
+
3968
3968
  (function (tree) {
3969
3969
 
3970
3970
  tree.Element = function (combinator, value, index, currentFileInfo) {
@@ -4073,7 +4073,7 @@ tree.Combinator.prototype = {
4073
4073
  };
4074
4074
 
4075
4075
  })(require('../tree'));
4076
-
4076
+
4077
4077
  (function (tree) {
4078
4078
 
4079
4079
  tree.Expression = function (value) { this.value = value; };
@@ -4128,7 +4128,7 @@ tree.Expression.prototype = {
4128
4128
  };
4129
4129
 
4130
4130
  })(require('../tree'));
4131
-
4131
+
4132
4132
  (function (tree) {
4133
4133
 
4134
4134
  tree.Extend = function Extend(selector, option, index) {
@@ -4182,7 +4182,7 @@ tree.Extend.prototype = {
4182
4182
  };
4183
4183
 
4184
4184
  })(require('../tree'));
4185
-
4185
+
4186
4186
  (function (tree) {
4187
4187
  //
4188
4188
  // CSS @import node
@@ -4307,7 +4307,7 @@ tree.Import.prototype = {
4307
4307
  };
4308
4308
 
4309
4309
  })(require('../tree'));
4310
-
4310
+
4311
4311
  (function (tree) {
4312
4312
 
4313
4313
  tree.JavaScript = function (string, index, escaped) {
@@ -4366,7 +4366,7 @@ tree.JavaScript.prototype = {
4366
4366
 
4367
4367
  })(require('../tree'));
4368
4368
 
4369
-
4369
+
4370
4370
  (function (tree) {
4371
4371
 
4372
4372
  tree.Keyword = function (value) { this.value = value; };
@@ -4391,7 +4391,7 @@ tree.True = new(tree.Keyword)('true');
4391
4391
  tree.False = new(tree.Keyword)('false');
4392
4392
 
4393
4393
  })(require('../tree'));
4394
-
4394
+
4395
4395
  (function (tree) {
4396
4396
 
4397
4397
  tree.Media = function (value, features, index, currentFileInfo) {
@@ -4549,7 +4549,7 @@ tree.Media.prototype = {
4549
4549
  };
4550
4550
 
4551
4551
  })(require('../tree'));
4552
-
4552
+
4553
4553
  (function (tree) {
4554
4554
 
4555
4555
  tree.mixin = {};
@@ -4865,7 +4865,7 @@ tree.mixin.Definition.prototype = {
4865
4865
  };
4866
4866
 
4867
4867
  })(require('../tree'));
4868
-
4868
+
4869
4869
  (function (tree) {
4870
4870
 
4871
4871
  tree.Negative = function (node) {
@@ -4890,7 +4890,7 @@ tree.Negative.prototype = {
4890
4890
  };
4891
4891
 
4892
4892
  })(require('../tree'));
4893
-
4893
+
4894
4894
  (function (tree) {
4895
4895
 
4896
4896
  tree.Operation = function (op, operands, isSpaced) {
@@ -4948,7 +4948,7 @@ tree.operate = function (env, op, a, b) {
4948
4948
  };
4949
4949
 
4950
4950
  })(require('../tree'));
4951
-
4951
+
4952
4952
 
4953
4953
  (function (tree) {
4954
4954
 
@@ -4972,7 +4972,7 @@ tree.Paren.prototype = {
4972
4972
  };
4973
4973
 
4974
4974
  })(require('../tree'));
4975
-
4975
+
4976
4976
  (function (tree) {
4977
4977
 
4978
4978
  tree.Quoted = function (str, content, escaped, index, currentFileInfo) {
@@ -5021,7 +5021,7 @@ tree.Quoted.prototype = {
5021
5021
  };
5022
5022
 
5023
5023
  })(require('../tree'));
5024
-
5024
+
5025
5025
  (function (tree) {
5026
5026
 
5027
5027
  tree.Rule = function (name, value, important, merge, index, currentFileInfo, inline) {
@@ -5112,7 +5112,7 @@ function evalName(env, name) {
5112
5112
  }
5113
5113
 
5114
5114
  })(require('../tree'));
5115
-
5115
+
5116
5116
  (function (tree) {
5117
5117
 
5118
5118
  tree.RulesetCall = function (variable) {
@@ -5129,7 +5129,7 @@ tree.RulesetCall.prototype = {
5129
5129
  };
5130
5130
 
5131
5131
  })(require('../tree'));
5132
-
5132
+
5133
5133
  (function (tree) {
5134
5134
 
5135
5135
  tree.Ruleset = function (selectors, rules, strictImports) {
@@ -5684,7 +5684,7 @@ tree.Ruleset.prototype = {
5684
5684
  }
5685
5685
  };
5686
5686
  })(require('../tree'));
5687
-
5687
+
5688
5688
  (function (tree) {
5689
5689
 
5690
5690
  tree.Selector = function (elements, extendList, condition, index, currentFileInfo, isReferenced) {
@@ -5814,7 +5814,7 @@ tree.Selector.prototype = {
5814
5814
  };
5815
5815
 
5816
5816
  })(require('../tree'));
5817
-
5817
+
5818
5818
  (function (tree) {
5819
5819
 
5820
5820
  tree.UnicodeDescriptor = function (value) {
@@ -5830,7 +5830,7 @@ tree.UnicodeDescriptor.prototype = {
5830
5830
  };
5831
5831
 
5832
5832
  })(require('../tree'));
5833
-
5833
+
5834
5834
  (function (tree) {
5835
5835
 
5836
5836
  tree.URL = function (val, currentFileInfo, isEvald) {
@@ -5884,7 +5884,7 @@ tree.URL.prototype = {
5884
5884
  };
5885
5885
 
5886
5886
  })(require('../tree'));
5887
-
5887
+
5888
5888
  (function (tree) {
5889
5889
 
5890
5890
  tree.Value = function (value) {
@@ -5919,7 +5919,7 @@ tree.Value.prototype = {
5919
5919
  };
5920
5920
 
5921
5921
  })(require('../tree'));
5922
-
5922
+
5923
5923
  (function (tree) {
5924
5924
 
5925
5925
  tree.Variable = function (name, index, currentFileInfo) {
@@ -5964,7 +5964,7 @@ tree.Variable.prototype = {
5964
5964
  };
5965
5965
 
5966
5966
  })(require('../tree'));
5967
-
5967
+
5968
5968
  (function (tree) {
5969
5969
 
5970
5970
  var parseCopyProperties = [
@@ -6101,7 +6101,7 @@ tree.Variable.prototype = {
6101
6101
  };
6102
6102
 
6103
6103
  })(require('./tree'));
6104
-
6104
+
6105
6105
  (function (tree) {
6106
6106
 
6107
6107
  var _visitArgs = { visitDeeper: true },
@@ -6247,7 +6247,7 @@ tree.Variable.prototype = {
6247
6247
  }
6248
6248
  };
6249
6249
 
6250
- })(require('./tree'));
6250
+ })(require('./tree'));
6251
6251
  (function (tree) {
6252
6252
  tree.importVisitor = function(importer, finish, evalEnv, onceFileDetectionMap, recursionDetector) {
6253
6253
  this._visitor = new tree.visitor(this);
@@ -6389,7 +6389,7 @@ tree.Variable.prototype = {
6389
6389
  }
6390
6390
  };
6391
6391
 
6392
- })(require('./tree'));
6392
+ })(require('./tree'));
6393
6393
  (function (tree) {
6394
6394
  tree.joinSelectorVisitor = function() {
6395
6395
  this.contexts = [[]];
@@ -6433,7 +6433,7 @@ tree.Variable.prototype = {
6433
6433
  }
6434
6434
  };
6435
6435
 
6436
- })(require('./tree'));
6436
+ })(require('./tree'));
6437
6437
  (function (tree) {
6438
6438
  tree.toCSSVisitor = function(env) {
6439
6439
  this._visitor = new tree.visitor(this);
@@ -6673,7 +6673,7 @@ tree.Variable.prototype = {
6673
6673
  }
6674
6674
  };
6675
6675
 
6676
- })(require('./tree'));
6676
+ })(require('./tree'));
6677
6677
  (function (tree) {
6678
6678
  /*jshint loopfunc:true */
6679
6679
 
@@ -7090,7 +7090,7 @@ tree.Variable.prototype = {
7090
7090
  };
7091
7091
 
7092
7092
  })(require('./tree'));
7093
-
7093
+
7094
7094
  (function (tree) {
7095
7095
 
7096
7096
  tree.sourceMapOutput = function (options) {
@@ -7232,7 +7232,7 @@ tree.Variable.prototype = {
7232
7232
  };
7233
7233
 
7234
7234
  })(require('./tree'));
7235
-
7235
+
7236
7236
  //
7237
7237
  // browser.js - client-side engine
7238
7238
  //
@@ -7910,12 +7910,12 @@ less.refreshStyles = loadStyles;
7910
7910
  less.Parser.fileLoader = loadFile;
7911
7911
 
7912
7912
  less.refresh(less.env === 'development');
7913
-
7913
+
7914
7914
  // amd.js
7915
7915
  //
7916
7916
  // Define Less as an AMD module.
7917
7917
  if (typeof define === "function" && define.amd) {
7918
7918
  define(function () { return less; } );
7919
7919
  }
7920
-
7920
+
7921
7921
  })(window);