less 2.5.1 → 2.6.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.
- package/.travis.yml +3 -2
- package/CHANGELOG.md +41 -0
- package/Gruntfile.js +5 -10
- package/README.md +3 -3
- package/appveyor.yml +2 -2
- package/bin/lessc +1 -0
- package/bower.json +1 -2
- package/dist/less.js +969 -605
- package/dist/less.min.js +13 -9
- package/gradlew +0 -0
- package/lib/less/contexts.js +0 -1
- package/lib/less/functions/color.js +5 -2
- package/lib/less/functions/math-helper.js +16 -0
- package/lib/less/functions/math.js +4 -16
- package/lib/less/functions/number.js +7 -2
- package/lib/less/index.js +1 -1
- package/lib/less/parser/parser-input.js +68 -68
- package/lib/less/parser/parser.js +159 -75
- package/lib/less/transform-tree.js +1 -0
- package/lib/less/tree/anonymous.js +4 -2
- package/lib/less/tree/color.js +4 -1
- package/lib/less/tree/comment.js +2 -6
- package/lib/less/tree/directive.js +3 -18
- package/lib/less/tree/element.js +9 -2
- package/lib/less/tree/extend.js +10 -5
- package/lib/less/tree/import.js +23 -5
- package/lib/less/tree/media.js +4 -2
- package/lib/less/tree/mixin-call.js +31 -18
- package/lib/less/tree/mixin-definition.js +19 -7
- package/lib/less/tree/node.js +49 -0
- package/lib/less/tree/rule.js +1 -1
- package/lib/less/tree/ruleset.js +107 -125
- package/lib/less/tree/selector.js +4 -9
- package/lib/less/tree/unit.js +2 -2
- package/lib/less/visitors/extend-visitor.js +17 -8
- package/lib/less/visitors/import-visitor.js +5 -0
- package/lib/less/visitors/index.js +1 -0
- package/lib/less/visitors/set-tree-visibility-visitor.js +38 -0
- package/lib/less/visitors/to-css-visitor.js +181 -98
- package/lib/less-browser/bootstrap.js +28 -2
- package/lib/less-browser/cache.js +11 -4
- package/lib/less-browser/error-reporting.js +10 -10
- package/lib/less-browser/file-manager.js +1 -1
- package/lib/less-browser/image-size.js +28 -0
- package/lib/less-browser/index.js +9 -10
- package/package.json +14 -14
- package/test/browser/less/errors/image-height-error.less +3 -0
- package/test/browser/less/errors/image-height-error.txt +4 -0
- package/test/browser/less/errors/image-size-error.less +3 -0
- package/test/browser/less/errors/image-size-error.txt +4 -0
- package/test/browser/less/errors/image-width-error.less +3 -0
- package/test/browser/less/errors/image-width-error.txt +4 -0
- package/test/browser/less.js +23 -19
- package/test/css/comments2.css +7 -1
- package/test/css/compression/compression.css +1 -1
- package/test/css/css-3.css +6 -0
- package/test/css/extend-selector.css +7 -0
- package/test/css/extract-and-length.css +1 -1
- package/test/css/functions.css +3 -3
- package/test/css/import-reference-issues.css +24 -0
- package/test/css/import-reference.css +5 -1
- package/test/css/include-path/include-path.css +1 -1
- package/test/css/include-path-string/include-path-string.css +1 -1
- package/test/css/mixins-args.css +51 -1
- package/test/css/mixins-guards.css +36 -0
- package/test/css/no-strict-math/mixins-guards.css +12 -0
- package/test/css/no-strict-math/no-sm-operations.css +12 -0
- package/test/css/operations.css +1 -0
- package/test/css/scope.css +1 -1
- package/test/css/strings.css +1 -1
- package/test/css/url-args/urls.css +5 -5
- package/test/css/urls.css +8 -8
- package/test/css/variables.css +5 -5
- package/test/data/image.jpg +0 -0
- package/test/data/image.svg +2 -1
- package/test/data/page.html +1 -1
- package/test/index.js +1 -0
- package/test/less/comments2.less +11 -0
- package/test/less/css-3.less +10 -2
- package/test/less/errors/at-rules-undefined-var.txt +4 -4
- package/test/less/errors/css-guard-default-func.txt +4 -4
- package/test/less/errors/javascript-undefined-var.txt +4 -4
- package/test/less/errors/mixins-guards-default-func-1.txt +4 -4
- package/test/less/errors/mixins-guards-default-func-2.txt +4 -4
- package/test/less/errors/mixins-guards-default-func-3.txt +4 -4
- package/test/less/errors/parse-error-media-no-block-1.txt +1 -1
- package/test/less/errors/parse-error-media-no-block-2.txt +1 -1
- package/test/less/errors/parse-error-media-no-block-3.txt +1 -1
- package/test/less/errors/percentage-non-number-argument.less +3 -0
- package/test/less/errors/percentage-non-number-argument.txt +4 -0
- package/test/less/errors/property-interp-not-defined.txt +2 -2
- package/test/less/extend-selector.less +12 -1
- package/test/less/import/import-inline-invalid-css.less +1 -0
- package/test/less/import/import-reference.less +10 -1
- package/test/less/import-reference-issues/appender-reference-1968.less +6 -0
- package/test/less/import-reference-issues/global-scope-import.less +13 -0
- package/test/less/import-reference-issues/global-scope-nested.less +3 -0
- package/test/less/import-reference-issues/mixin-1968.less +8 -0
- package/test/less/import-reference-issues/multiple-import-nested.less +12 -0
- package/test/less/import-reference-issues/multiple-import.less +10 -0
- package/test/less/import-reference-issues/simple-mixin.css +3 -0
- package/test/less/import-reference-issues/simple-ruleset-2162.less +3 -0
- package/test/less/import-reference-issues.less +50 -0
- package/test/less/import-reference.less +2 -0
- package/test/less/mixins-args.less +48 -0
- package/test/less/mixins-guards.less +78 -0
- package/test/less/no-strict-math/mixins-guards.less +25 -0
- package/test/less/no-strict-math/no-sm-operations.less +10 -0
- package/test/less/operations.less +1 -0
- package/test/less-bom/comments2.less +11 -0
- package/test/less-bom/css-3.less +10 -2
- package/test/less-bom/errors/at-rules-undefined-var.txt +4 -4
- package/test/less-bom/errors/css-guard-default-func.txt +4 -4
- package/test/less-bom/errors/javascript-undefined-var.txt +4 -4
- package/test/less-bom/errors/mixins-guards-default-func-1.txt +4 -4
- package/test/less-bom/errors/mixins-guards-default-func-2.txt +4 -4
- package/test/less-bom/errors/mixins-guards-default-func-3.txt +4 -4
- package/test/less-bom/errors/parse-error-media-no-block-1.txt +1 -1
- package/test/less-bom/errors/parse-error-media-no-block-2.txt +1 -1
- package/test/less-bom/errors/parse-error-media-no-block-3.txt +1 -1
- package/test/less-bom/errors/percentage-non-number-argument.less +3 -0
- package/test/less-bom/errors/percentage-non-number-argument.txt +4 -0
- package/test/less-bom/errors/property-interp-not-defined.txt +2 -2
- package/test/less-bom/extend-selector.less +12 -1
- package/test/less-bom/import/import-inline-invalid-css.less +1 -0
- package/test/less-bom/import/import-reference.less +10 -1
- package/test/less-bom/import-reference-issues/appender-reference-1968.less +6 -0
- package/test/less-bom/import-reference-issues/global-scope-import.less +13 -0
- package/test/less-bom/import-reference-issues/global-scope-nested.less +3 -0
- package/test/less-bom/import-reference-issues/mixin-1968.less +8 -0
- package/test/less-bom/import-reference-issues/multiple-import-nested.less +12 -0
- package/test/less-bom/import-reference-issues/multiple-import.less +10 -0
- package/test/less-bom/import-reference-issues/simple-mixin.css +3 -0
- package/test/less-bom/import-reference-issues/simple-ruleset-2162.less +3 -0
- package/test/less-bom/import-reference-issues.less +50 -0
- package/test/less-bom/import-reference.less +2 -0
- package/test/less-bom/mixins-args.less +48 -0
- package/test/less-bom/mixins-guards.less +78 -0
- package/test/less-bom/no-strict-math/mixins-guards.less +25 -0
- package/test/less-bom/no-strict-math/no-sm-operations.less +10 -0
- package/test/less-bom/operations.less +1 -0
- package/test/less-test.js +6 -1
- package/.idea/.name +0 -1
- package/.idea/jsLibraryMappings.xml +0 -6
- package/.idea/less.js.iml +0 -9
- package/.idea/libraries/less_js_node_modules.xml +0 -14
- package/.idea/misc.xml +0 -14
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/.idea/workspace.xml +0 -281
package/.travis.yml
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
language: node_js
|
|
2
2
|
node_js:
|
|
3
|
-
- "
|
|
3
|
+
- "4.2.0"
|
|
4
|
+
- "4.0.0"
|
|
4
5
|
- "0.12"
|
|
5
|
-
- "0.11"
|
|
6
6
|
- "0.10"
|
|
7
7
|
install:
|
|
8
8
|
- npm install -g grunt-cli
|
|
@@ -11,3 +11,4 @@ env:
|
|
|
11
11
|
global:
|
|
12
12
|
- secure: TrNVruWYaUK5ALga1y7wRY+MLjWJECUSCsBmKW5EUmIevOUxqHWu7M89FANKxstEeFRRAGH3QJbloRxnzIgh0U0ah5npE9XA1bYXGO5khoXeIyk7pNRfjIo8aEnJH1Vp8vWA6J6ovxdJ7lCFKEGvGKxGde50knVl7KFVVULlX2U=
|
|
13
13
|
- secure: Rzh+CEI7YRvvVkOruPE8Z0dkU0s13V6b6cpqbN72vxbJl/Jm5PUZkjTFJdkWJrW3ErhCKX6EC7XdGvrclqEA9WAqKzrecqCJYqTnw4MwqiAj6F9wqE/BqhoWg4xPxm0MK/7eJMvLCgjNpe+gc1CaeFJZkLSNWn6nOFke+vVlf9Q=
|
|
14
|
+
sudo: false
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
+
# 2.6.1
|
|
2
|
+
|
|
3
|
+
2016-03-04
|
|
4
|
+
|
|
5
|
+
- Update Less.js dependencies
|
|
6
|
+
- Fix comments after named color regression
|
|
7
|
+
- use instanceof operator instead of class comparison optimization
|
|
8
|
+
- disallow whitespace in variable calls
|
|
9
|
+
|
|
10
|
+
# 2.6.0
|
|
11
|
+
|
|
12
|
+
2016-01-29
|
|
13
|
+
|
|
14
|
+
- Underscore now allowed in dimension unit
|
|
15
|
+
- Fixes for import by reference
|
|
16
|
+
- Fix for #2384 Changes HTTPRequest "sync" setting to simply hide the page until less has rendered, browser version is now orders of magnitude faster.
|
|
17
|
+
- Added ability to cache stylesheets while using modifyVars
|
|
18
|
+
- Error when when image-size functions are used in browser-less
|
|
19
|
+
- Fixed extend leaking through nested parent selector. #2586
|
|
20
|
+
- Added "or" keyword and allowed arbitrary logical expression in guards
|
|
21
|
+
- Fixing #2124 - Parsing Error "Unrecognised input" for color operations
|
|
22
|
+
- Logical operator ```and``` now has higher precedence than logical operator ```or```.
|
|
23
|
+
- Allow unknown at-rules w/o {} block
|
|
24
|
+
|
|
25
|
+
# 2.5.3
|
|
26
|
+
|
|
27
|
+
2015-09-25
|
|
28
|
+
|
|
29
|
+
- Fix import inline a URL
|
|
30
|
+
|
|
31
|
+
# 2.5.2
|
|
32
|
+
|
|
33
|
+
2015-09-24
|
|
34
|
+
|
|
35
|
+
- No output should result in an empty sourcemap
|
|
36
|
+
- Import inline located inside file imported by reference should not be present in output
|
|
37
|
+
- Shorthand colors will stay shorthand
|
|
38
|
+
- Make percentage work like other math functions and throw an error on NaN
|
|
39
|
+
- Fixed mixin definition matching problem when mixin definition contains parameters with default values
|
|
40
|
+
- Observe reference for imported comments
|
|
41
|
+
|
|
1
42
|
# 2.5.1
|
|
2
43
|
|
|
3
44
|
2015-05-21
|
package/Gruntfile.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
var fs = require('fs');
|
|
3
2
|
|
|
4
3
|
module.exports = function (grunt) {
|
|
5
4
|
|
|
@@ -171,7 +170,7 @@ module.exports = function (grunt) {
|
|
|
171
170
|
}
|
|
172
171
|
},
|
|
173
172
|
errors: {
|
|
174
|
-
src: ['test/less/errors/*.less', '!test/less/errors/javascript-error.less'],
|
|
173
|
+
src: ['test/less/errors/*.less', '!test/less/errors/javascript-error.less', 'test/browser/less/errors/*.less'],
|
|
175
174
|
options: {
|
|
176
175
|
timeout: 20000,
|
|
177
176
|
helpers: 'test/browser/runner-errors-options.js',
|
|
@@ -361,18 +360,11 @@ module.exports = function (grunt) {
|
|
|
361
360
|
'test'
|
|
362
361
|
]);
|
|
363
362
|
|
|
364
|
-
grunt.registerTask('updateBowerJson', function () {
|
|
365
|
-
var bowerJson = require('./bower.json');
|
|
366
|
-
bowerJson.version = grunt.config('pkg.version');
|
|
367
|
-
fs.writeFileSync('./bower.json', JSON.stringify(bowerJson, null, 2));
|
|
368
|
-
});
|
|
369
|
-
|
|
370
363
|
// Release
|
|
371
364
|
grunt.registerTask('dist', [
|
|
372
365
|
'browserify:browser',
|
|
373
366
|
'concat:dist',
|
|
374
|
-
'uglify:dist'
|
|
375
|
-
'updateBowerJson'
|
|
367
|
+
'uglify:dist'
|
|
376
368
|
]);
|
|
377
369
|
|
|
378
370
|
// Release Rhino Version
|
|
@@ -449,6 +441,9 @@ module.exports = function (grunt) {
|
|
|
449
441
|
// Run all tests
|
|
450
442
|
grunt.registerTask('test', testTasks);
|
|
451
443
|
|
|
444
|
+
// Run all tests
|
|
445
|
+
grunt.registerTask('quicktest', testTasks.slice(0, testTasks.length -1));
|
|
446
|
+
|
|
452
447
|
// generate a good test environment for testing sourcemaps
|
|
453
448
|
grunt.registerTask('sourcemap-test', [
|
|
454
449
|
'clean:sourcemap-test',
|
package/README.md
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
# [Less.js](http://lesscss.org)
|
|
6
6
|
|
|
7
|
-
[](https://gitter.im/less/less.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
8
|
-
|
|
9
7
|
> The **dynamic** stylesheet language. [http://lesscss.org](http://lesscss.org).
|
|
10
8
|
|
|
11
9
|
This is the JavaScript, official, stable version of Less.
|
|
12
10
|
|
|
11
|
+
###### :point_right: [](https://gitter.im/less/less.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) <sup>Chat with Less.js users</sup>
|
|
12
|
+
|
|
13
13
|
|
|
14
14
|
## Getting Started
|
|
15
15
|
|
|
@@ -47,7 +47,7 @@ See the [changelog](CHANGELOG.md)
|
|
|
47
47
|
|
|
48
48
|
## [License](LICENSE)
|
|
49
49
|
|
|
50
|
-
Copyright (c) 2009-
|
|
50
|
+
Copyright (c) 2009-2016 [Alexis Sellier](http://cloudhead.io) & The Core Less Team
|
|
51
51
|
Licensed under the [Apache License](LICENSE).
|
|
52
52
|
|
|
53
53
|
|
package/appveyor.yml
CHANGED
|
@@ -3,6 +3,7 @@ environment:
|
|
|
3
3
|
matrix:
|
|
4
4
|
- nodejs_version: "0.10"
|
|
5
5
|
- nodejs_version: "0.12"
|
|
6
|
+
- nodejs_version: "4"
|
|
6
7
|
|
|
7
8
|
# Install scripts. (runs after repo cloning)
|
|
8
9
|
install:
|
|
@@ -20,8 +21,7 @@ install:
|
|
|
20
21
|
# Post-install test scripts.
|
|
21
22
|
test_script:
|
|
22
23
|
# Output useful info for debugging.
|
|
23
|
-
- node --version
|
|
24
|
-
- npm --version
|
|
24
|
+
- node --version && npm --version
|
|
25
25
|
# Run test
|
|
26
26
|
- grunt test
|
|
27
27
|
|
package/bin/lessc
CHANGED
|
@@ -353,6 +353,7 @@ function printUsage() {
|
|
|
353
353
|
|
|
354
354
|
if (!sourceMapFileInline) {
|
|
355
355
|
var writeSourceMap = function(output, onDone) {
|
|
356
|
+
output = output || "";
|
|
356
357
|
var filename = sourceMapOptions.sourceMapFullFilename;
|
|
357
358
|
ensureDirectory(filename);
|
|
358
359
|
fs.writeFile(filename, output, 'utf8', function (err) {
|