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.
- package/.grunt/grunt-contrib-jasmine/es5-shim.js +1360 -0
- package/.idea/jsLibraryMappings.xml +0 -1
- package/.idea/workspace.xml +182 -183
- package/.travis.yml +0 -1
- package/CHANGELOG.md +60 -2
- package/CONTRIBUTING.md +1 -1
- package/Gruntfile.js +12 -24
- package/LICENSE +0 -2
- package/README.md +5 -3
- package/benchmark/less-benchmark.js +1 -2
- package/bin/lessc +13 -11
- package/bower.json +2 -2
- package/build/rhino-modules.js +1 -1
- package/dist/less-1.7.0.js +59 -59
- package/dist/less-1.7.0.min.js +12 -12
- package/dist/less-1.7.1.js +7936 -0
- package/dist/less-1.7.1.min.js +16 -0
- package/dist/less-1.7.2.js +7938 -0
- package/dist/less-1.7.2.min.js +16 -0
- package/dist/less-1.7.3.js +7942 -0
- package/dist/less-1.7.3.min.js +16 -0
- package/dist/less-1.7.4.js +7979 -0
- package/dist/less-1.7.4.min.js +16 -0
- package/dist/less-1.7.5.js +8008 -0
- package/dist/less-1.7.5.min.js +16 -0
- package/dist/less-rhino-1.7.0.js +48 -48
- package/dist/less-rhino-1.7.1.js +9311 -0
- package/dist/less-rhino-1.7.2.js +9313 -0
- package/dist/less-rhino-1.7.3.js +9317 -0
- package/dist/less-rhino-1.7.4.js +9354 -0
- package/dist/less-rhino-1.7.5.js +9383 -0
- package/dist/lessc-rhino-1.7.0.js +2 -2
- package/dist/lessc-rhino-1.7.1.js +449 -0
- package/dist/lessc-rhino-1.7.2.js +449 -0
- package/dist/lessc-rhino-1.7.3.js +449 -0
- package/dist/lessc-rhino-1.7.4.js +449 -0
- package/dist/lessc-rhino-1.7.5.js +449 -0
- package/lib/less/browser.js +14 -9
- package/lib/less/env.js +2 -0
- package/lib/less/fs.js +10 -0
- package/lib/less/functions.js +41 -38
- package/lib/less/import-visitor.js +9 -7
- package/lib/less/index.js +30 -18
- package/lib/less/lessc_helper.js +1 -0
- package/lib/less/parser/parser.js.orig +1747 -0
- package/lib/less/parser.js +81 -40
- package/lib/less/rhino.js +3 -3
- package/lib/less/source-map-output.js +1 -1
- package/lib/less/to-css-visitor.js +3 -0
- package/lib/less/tree/anonymous.js +7 -3
- package/lib/less/tree/directive.js +6 -0
- package/lib/less/tree/element.js +6 -22
- package/lib/less/tree/import.js +1 -1
- package/lib/less/tree/mixin.js +4 -3
- package/lib/less/tree/quoted.js +12 -4
- package/lib/less/tree/rule.js +7 -4
- package/lib/less/tree/rule.js.orig +164 -0
- package/lib/less/tree/ruleset.js +27 -2
- package/lib/less/tree/selector.js +1 -1
- package/lib/less/tree.js +2 -2
- package/package.json +13 -12
- package/test/browser/less.js +7317 -6931
- package/test/css/comments.css +8 -0
- package/test/css/css-3.css +9 -0
- package/test/css/functions.css +8 -8
- package/test/css/import-inline.css +4 -1
- package/test/css/import.css +6 -0
- package/test/css/javascript.css +5 -0
- package/test/css/mixins-guards.css +14 -3
- package/test/css/mixins.css +3 -0
- package/test/css/property-name-interp.css +1 -0
- package/test/css/urls.css +6 -0
- package/test/index.js +1 -1
- package/test/less/comments.less +14 -1
- package/test/less/css-3.less +12 -1
- package/test/less/errors/color-invalid-hex-code.less +3 -0
- package/test/less/errors/color-invalid-hex-code.txt +4 -0
- package/test/less/errors/color-invalid-hex-code2.less +3 -0
- package/test/less/errors/color-invalid-hex-code2.txt +4 -0
- package/test/less/errors/import-malformed.less +1 -0
- package/test/less/errors/import-malformed.txt +3 -0
- package/test/less/errors/import-no-semi.txt +1 -1
- package/test/less/errors/javascript-error.less +1 -1
- package/test/less/errors/javascript-error.txt +2 -2
- package/test/less/import-inline.less +1 -0
- package/test/less/import.less +8 -1
- package/test/less/javascript.less +9 -0
- package/test/less/mixins-guards.less +17 -3
- package/test/less/mixins.less +4 -0
- package/test/less/property-name-interp.less +4 -1
- package/test/less/property-name-interp.less.orig +59 -0
- package/test/less/urls.less +12 -0
- package/test/less-test.js +7 -8
- package/test/modify-vars.js +17 -0
- package/test/sourcemaps/basic.json +1 -1
- package/tmp/browser/test-runner-main.html +4 -0
- package/tmp/less.js +8295 -0
- package/build/README.md +0 -51
- package/tmp/browser/test-postProcessor.html +0 -59
- package/tmp/browser/test-runner-browser.html +0 -59
- package/tmp/browser/test-runner-errors.html +0 -267
- package/tmp/browser/test-runner-global-vars.html +0 -59
- package/tmp/browser/test-runner-legacy.html +0 -59
- package/tmp/browser/test-runner-modify-vars.html +0 -59
- package/tmp/browser/test-runner-no-js-errors.html +0 -59
- package/tmp/browser/test-runner-production.html +0 -55
- package/tmp/browser/test-runner-relative-urls.html +0 -59
- package/tmp/browser/test-runner-rootpath-relative.html +0 -59
- package/tmp/browser/test-runner-rootpath.html +0 -59
package/.travis.yml
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,61 @@
|
|
|
1
|
+
# 1.7.5
|
|
2
|
+
|
|
3
|
+
2014-09-03
|
|
4
|
+
|
|
5
|
+
- Allow comments in keyframe (complete comment support coming in 2.0)
|
|
6
|
+
- pass options to parser from less.render
|
|
7
|
+
- Support /deep/ combinator
|
|
8
|
+
- handle fragments in data-uri's
|
|
9
|
+
- float @charsets to the top correctly
|
|
10
|
+
- updates to some dependencies
|
|
11
|
+
- Fix interpolated import in media query
|
|
12
|
+
- A few other various small corrections
|
|
13
|
+
|
|
14
|
+
# 1.7.4
|
|
15
|
+
|
|
16
|
+
2014-07-27
|
|
17
|
+
|
|
18
|
+
- Handle uppercase paths in browser
|
|
19
|
+
- Show error if an empty selector is used in extend
|
|
20
|
+
- Fix property merging in directives
|
|
21
|
+
- Fix ordering of charset and import directives
|
|
22
|
+
- Fix race condition that caused a rules is undefined error sometimes if you had a complex import strategy
|
|
23
|
+
- Better error message for imports missing semi-colons or malformed
|
|
24
|
+
- Do not use util.print to avoid deprecate warnings in node 0.11
|
|
25
|
+
|
|
26
|
+
# 1.7.3
|
|
27
|
+
|
|
28
|
+
2014-06-22
|
|
29
|
+
|
|
30
|
+
- Include dist files, missing from 1.7.2
|
|
31
|
+
- Do not round the results of color functions, like lightness, hue, luma etc.
|
|
32
|
+
- Support cover and contain keywords in background definitions
|
|
33
|
+
|
|
34
|
+
# 1.7.2
|
|
35
|
+
|
|
36
|
+
2014-06-19
|
|
37
|
+
|
|
38
|
+
- Allow paths option to be a string (in 1.7.1 less started throwing an exception instead of incorrectly processing the string as an array of chars)
|
|
39
|
+
- Do not round numbers when used with javascript (introduced 1.7.0)
|
|
40
|
+
|
|
41
|
+
# 1.7.1
|
|
42
|
+
|
|
43
|
+
2014-06-08
|
|
44
|
+
|
|
45
|
+
- Fix detection of recursive mixins
|
|
46
|
+
- Fix the paths option for later versions of node (0.10+)
|
|
47
|
+
- Fix paths joining bug
|
|
48
|
+
- Fix a number precision issue on some versions of node
|
|
49
|
+
- Fix an IE8 issue with importing css files
|
|
50
|
+
- Fix IE11 detection for xhr requests
|
|
51
|
+
- Modify var works if the last line of a less file is a comment.
|
|
52
|
+
- Better detection of valid hex colour codes
|
|
53
|
+
- Some stability fixes to support a low number of available file handles
|
|
54
|
+
- Support comparing values with different quote types e.g. "test" now === 'test'
|
|
55
|
+
- Give better error messages if accessing a url that returns a non 200 status code
|
|
56
|
+
- Fix the e() function when passed empty string
|
|
57
|
+
- Several minor bug fixes
|
|
58
|
+
|
|
1
59
|
# 1.7.0
|
|
2
60
|
|
|
3
61
|
2014-02-27
|
|
@@ -135,7 +193,7 @@
|
|
|
135
193
|
- fix passing of strict maths option
|
|
136
194
|
|
|
137
195
|
# 1.4.0 Beta 4
|
|
138
|
-
|
|
196
|
+
|
|
139
197
|
2013-05-04
|
|
140
198
|
|
|
141
199
|
- change strictMaths to strictMath. Enable this with --strict-math=on in lessc and strictMath:true in JavaScript.
|
|
@@ -168,7 +226,7 @@
|
|
|
168
226
|
- significant bug fixes to our debug options
|
|
169
227
|
- other parameters can be used as defaults in mixins e.g. .a(@a, @b:@a)
|
|
170
228
|
- an error is shown if properties are used outside of a ruleset
|
|
171
|
-
- added extract function which picks a value out of a list, e.g. extract(12 13 14, 3) => 14
|
|
229
|
+
- added extract function which picks a value out of a list, e.g. extract(12 13 14, 3) => 14
|
|
172
230
|
- added luma, hsvhue, hsvsaturation, hsvvalue functions
|
|
173
231
|
- added pow, pi, mod, tan, sin, cos, atan, asin, acos and sqrt math functions
|
|
174
232
|
- added convert function, e.g. convert(1rad, deg) => value in degrees
|
package/CONTRIBUTING.md
CHANGED
|
@@ -15,7 +15,7 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso
|
|
|
15
15
|
1. **Search for existing issues.** We get a lot of duplicate issues, and you'd help us out a lot by first checking if someone else has reported the same issue. Moreover, the issue may have already been resolved with a fix available.
|
|
16
16
|
2. **Create an isolated and reproducible test case.** Be sure the problem exists in Less.js's code with [reduced test cases](http://css-tricks.com/reduced-test-cases/) that should be included in each bug report.
|
|
17
17
|
3. **Test with the latest version**. We get a lot of issues that could be resolved by updating your version of Less.js.
|
|
18
|
-
3. **Include
|
|
18
|
+
3. **Include an example with source.** E.g. You can use [less2css.org](http://less2css.org/) to create a short test case.
|
|
19
19
|
4. **Share as much information as possible.** Include operating system and version. Describe how you use Less. If you use it in the browser, please include browser and version, and the version of Less.js you're using. Let us know if you're using the command line (`lessc`) or an external tool. And try to include steps to reproduce the bug.
|
|
20
20
|
5. If you have a solution or suggestion for how to fix the bug you're reporting, please include it, or make a pull request - don't assume the maintainers know how to fix it just because you do.
|
|
21
21
|
|
package/Gruntfile.js
CHANGED
|
@@ -15,17 +15,17 @@ module.exports = function(grunt) {
|
|
|
15
15
|
license: '<%= _.pluck(pkg.licenses, "type").join(", ") %>',
|
|
16
16
|
copyright: 'Copyright (c) 2009-<%= grunt.template.today("yyyy") %>',
|
|
17
17
|
banner:
|
|
18
|
-
'
|
|
19
|
-
' *
|
|
20
|
-
' * http://lesscss.org
|
|
21
|
-
'
|
|
22
|
-
' * <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email
|
|
23
|
-
' * Licensed under the <%= meta.license %> License
|
|
24
|
-
'
|
|
25
|
-
'
|
|
18
|
+
'/*!\n' +
|
|
19
|
+
' * Less - <%= pkg.description %> v<%= pkg.version %>\n' +
|
|
20
|
+
' * http://lesscss.org\n' +
|
|
21
|
+
' *\n' +
|
|
22
|
+
' * <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>>\n' +
|
|
23
|
+
' * Licensed under the <%= meta.license %> License.\n' +
|
|
24
|
+
' *\n' +
|
|
25
|
+
' */\n\n' +
|
|
26
26
|
' /**' +
|
|
27
27
|
' * @license <%= meta.license %>\n' +
|
|
28
|
-
'
|
|
28
|
+
' */\n\n'
|
|
29
29
|
},
|
|
30
30
|
|
|
31
31
|
shell: {
|
|
@@ -64,7 +64,7 @@ module.exports = function(grunt) {
|
|
|
64
64
|
// Rhino
|
|
65
65
|
rhino: {
|
|
66
66
|
options: {
|
|
67
|
-
banner: '/*
|
|
67
|
+
banner: '/* Less.js v<%= pkg.version %> RHINO | <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> */\n\n',
|
|
68
68
|
footer: '' // override task-level footer
|
|
69
69
|
},
|
|
70
70
|
src: ['<%= build.rhino %>'],
|
|
@@ -73,18 +73,11 @@ module.exports = function(grunt) {
|
|
|
73
73
|
// lessc for Rhino
|
|
74
74
|
rhinolessc: {
|
|
75
75
|
options: {
|
|
76
|
-
banner: '/*
|
|
76
|
+
banner: '/* Less.js v<%= pkg.version %> RHINO | <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> */\n\n',
|
|
77
77
|
footer: '' // override task-level footer
|
|
78
78
|
},
|
|
79
79
|
src: ['<%= build.rhinolessc %>'],
|
|
80
80
|
dest: 'dist/lessc-rhino-<%= pkg.version %>.js'
|
|
81
|
-
},
|
|
82
|
-
// Generate readme
|
|
83
|
-
readme: {
|
|
84
|
-
// override task-level banner and footer
|
|
85
|
-
options: {process: true, banner: '', footer: ''},
|
|
86
|
-
src: ['build/README.md'],
|
|
87
|
-
dest: 'README.md'
|
|
88
81
|
}
|
|
89
82
|
},
|
|
90
83
|
|
|
@@ -254,7 +247,7 @@ module.exports = function(grunt) {
|
|
|
254
247
|
'concat:rhino',
|
|
255
248
|
'concat:rhinolessc'
|
|
256
249
|
]);
|
|
257
|
-
|
|
250
|
+
|
|
258
251
|
// Run all browser tests
|
|
259
252
|
grunt.registerTask('browsertest', [
|
|
260
253
|
'browser',
|
|
@@ -290,9 +283,4 @@ module.exports = function(grunt) {
|
|
|
290
283
|
grunt.registerTask('benchmark', [
|
|
291
284
|
'shell:benchmark'
|
|
292
285
|
]);
|
|
293
|
-
|
|
294
|
-
// Readme.
|
|
295
|
-
grunt.registerTask('readme', [
|
|
296
|
-
'concat:readme'
|
|
297
|
-
]);
|
|
298
286
|
};
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
[](https://travis-ci.org/less/less.js)
|
|
2
|
-
|
|
1
|
+
[](http://badge.fury.io/js/less) [](https://travis-ci.org/less/less.js)
|
|
2
|
+
[](https://david-dm.org/less/less.js) [](https://david-dm.org/less/less.js#info=devDependencies) [](https://david-dm.org/less/less.js#info=optionalDependencies)
|
|
3
|
+
|
|
4
|
+
# [Less.js](http://lesscss.org)
|
|
3
5
|
|
|
4
6
|
> The **dynamic** stylesheet language. [http://lesscss.org](http://lesscss.org).
|
|
5
7
|
|
|
6
|
-
This is the JavaScript,
|
|
8
|
+
This is the JavaScript, official, stable version of Less.
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
## Getting Started
|
package/bin/lessc
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
var path = require('path'),
|
|
4
|
-
fs = require('fs'),
|
|
5
|
-
sys = require('util'),
|
|
4
|
+
fs = require('../lib/less/fs'),
|
|
6
5
|
os = require('os'),
|
|
7
6
|
mkdirp;
|
|
8
7
|
|
|
@@ -79,7 +78,7 @@ args = args.filter(function (arg) {
|
|
|
79
78
|
switch (arg) {
|
|
80
79
|
case 'v':
|
|
81
80
|
case 'version':
|
|
82
|
-
console.log("lessc " + less.version.join('.') + " (
|
|
81
|
+
console.log("lessc " + less.version.join('.') + " (Less Compiler) [JavaScript]");
|
|
83
82
|
continueProcessing = false;
|
|
84
83
|
case 'verbose':
|
|
85
84
|
options.verbose = true;
|
|
@@ -234,10 +233,13 @@ args = args.filter(function (arg) {
|
|
|
234
233
|
case "--compatibility":
|
|
235
234
|
cleancssOptions.compatibility = cleanOptionArgs[1];
|
|
236
235
|
break;
|
|
236
|
+
case "--rounding-precision":
|
|
237
|
+
cleancssOptions.roundingPrecision = Number(cleanOptionArgs[1]);
|
|
238
|
+
break;
|
|
237
239
|
default:
|
|
238
240
|
console.log("unrecognised clean-css option '" + cleanOptionArgs[0] + "'");
|
|
239
241
|
console.log("we support only arguments that make sense for less, '--keep-line-breaks', '-b'");
|
|
240
|
-
console.log("'--s0', '--s1', '--advanced', '--skip-advanced', '--compatibility'");
|
|
242
|
+
console.log("'--s0', '--s1', '--advanced', '--skip-advanced', '--compatibility', '--rounding-precision'");
|
|
241
243
|
continueProcessing = false;
|
|
242
244
|
currentErrorcode = 1;
|
|
243
245
|
break;
|
|
@@ -287,7 +289,7 @@ if (options.sourceMap === true) {
|
|
|
287
289
|
}
|
|
288
290
|
|
|
289
291
|
if (options.cleancss && options.sourceMap) {
|
|
290
|
-
console.log("the
|
|
292
|
+
console.log("the cleancss option is not compatible with sourcemap support at the moment. See Issue #1656");
|
|
291
293
|
return;
|
|
292
294
|
}
|
|
293
295
|
|
|
@@ -315,10 +317,10 @@ var ensureDirectory = function (filepath) {
|
|
|
315
317
|
|
|
316
318
|
if (options.depends) {
|
|
317
319
|
if (!outputbase) {
|
|
318
|
-
|
|
320
|
+
console.log("option --depends requires an output path to be specified");
|
|
319
321
|
return;
|
|
320
322
|
}
|
|
321
|
-
|
|
323
|
+
process.stdout.write(outputbase + ": ");
|
|
322
324
|
}
|
|
323
325
|
|
|
324
326
|
if (!sourceMapFileInline) {
|
|
@@ -336,7 +338,7 @@ var parseLessFile = function (e, data) {
|
|
|
336
338
|
return;
|
|
337
339
|
}
|
|
338
340
|
|
|
339
|
-
data = options.globalVariables + data + options.modifyVariables;
|
|
341
|
+
data = options.globalVariables + data + '\n' + options.modifyVariables;
|
|
340
342
|
|
|
341
343
|
options.paths = [path.dirname(input)].concat(options.paths);
|
|
342
344
|
options.filename = input;
|
|
@@ -349,9 +351,9 @@ var parseLessFile = function (e, data) {
|
|
|
349
351
|
return;
|
|
350
352
|
} else if (options.depends) {
|
|
351
353
|
for(var file in parser.imports.files) {
|
|
352
|
-
|
|
354
|
+
process.stdout.write(file + " ")
|
|
353
355
|
}
|
|
354
|
-
|
|
356
|
+
console.log("");
|
|
355
357
|
} else {
|
|
356
358
|
try {
|
|
357
359
|
if (options.lint) { writeSourceMap = function() {} }
|
|
@@ -383,7 +385,7 @@ var parseLessFile = function (e, data) {
|
|
|
383
385
|
console.log('lessc: wrote ' + output);
|
|
384
386
|
}
|
|
385
387
|
} else {
|
|
386
|
-
|
|
388
|
+
process.stdout.write(css);
|
|
387
389
|
}
|
|
388
390
|
}
|
|
389
391
|
} catch (e) {
|
package/bower.json
CHANGED
package/build/rhino-modules.js
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
var result = [];
|
|
51
51
|
for (i in parts) {
|
|
52
52
|
var part = parts[i];
|
|
53
|
-
if (part === '..' && result.length > 0) {
|
|
53
|
+
if (part === '..' && result.length > 0 && result[result.length-1] !== '..') {
|
|
54
54
|
result.pop();
|
|
55
55
|
} else if (part === '' && result.length > 0) {
|
|
56
56
|
// skip
|