less 2.5.1 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +5 -1
- data/README.md +12 -0
- data/lib/less/js/.travis.yml +8 -0
- data/lib/less/js/CHANGELOG.md +22 -0
- data/lib/less/js/CONTRIBUTING.md +1 -1
- data/lib/less/js/Gruntfile.js +8 -0
- data/lib/less/js/README.md +5 -304
- data/lib/less/js/bin/lessc +16 -13
- data/lib/less/js/bower.json +2 -2
- data/lib/less/js/build/README.md +4 -303
- data/lib/less/js/build/build.yml +2 -0
- data/lib/less/js/dist/less-1.6.3.js +7627 -0
- data/lib/less/js/dist/less-1.6.3.min.js +16 -0
- data/lib/less/js/dist/less-1.7.0.js +7921 -0
- data/lib/less/js/dist/less-1.7.0.min.js +16 -0
- data/lib/less/js/dist/less-rhino-1.6.3.js +9020 -0
- data/lib/less/js/dist/less-rhino-1.7.0.js +9301 -0
- data/lib/less/js/dist/lessc-rhino-1.6.3.js +449 -0
- data/lib/less/js/dist/lessc-rhino-1.7.0.js +449 -0
- data/lib/less/js/lib/less/browser.js +22 -9
- data/lib/less/js/lib/less/functions.js +47 -16
- data/lib/less/js/lib/less/import-visitor.js +29 -5
- data/lib/less/js/lib/less/index.js +10 -3
- data/lib/less/js/lib/less/parser.js +139 -52
- data/lib/less/js/lib/less/to-css-visitor.js +26 -4
- data/lib/less/js/lib/less/tree/color.js +11 -1
- data/lib/less/js/lib/less/tree/detached-ruleset.js +20 -0
- data/lib/less/js/lib/less/tree/dimension.js +17 -6
- data/lib/less/js/lib/less/tree/directive.js +33 -29
- data/lib/less/js/lib/less/tree/import.js +8 -1
- data/lib/less/js/lib/less/tree/keyword.js +1 -0
- data/lib/less/js/lib/less/tree/media.js +3 -0
- data/lib/less/js/lib/less/tree/mixin.js +15 -11
- data/lib/less/js/lib/less/tree/rule.js +14 -4
- data/lib/less/js/lib/less/tree/ruleset-call.js +16 -0
- data/lib/less/js/lib/less/tree/ruleset.js +48 -19
- data/lib/less/js/package.json +13 -13
- data/lib/less/js/test/browser/css/postProcessor/postProcessor.css +4 -0
- data/lib/less/js/test/browser/less/postProcessor/postProcessor.less +4 -0
- data/lib/less/js/test/browser/runner-postProcessor-options.js +4 -0
- data/lib/less/js/test/browser/runner-postProcessor.js +3 -0
- data/lib/less/js/test/css/debug/linenumbers-all.css +2 -2
- data/lib/less/js/test/css/debug/linenumbers-comments.css +1 -1
- data/lib/less/js/test/css/debug/linenumbers-mediaquery.css +1 -1
- data/lib/less/js/test/css/detached-rulesets.css +71 -0
- data/lib/less/js/test/css/functions.css +21 -4
- data/lib/less/js/test/css/import-reference.css +23 -4
- data/lib/less/js/test/css/merge.css +8 -0
- data/lib/less/js/test/css/mixins-pattern.css +4 -0
- data/lib/less/js/test/css/scope.css +3 -0
- data/lib/less/js/test/css/variables-in-at-rules.css +18 -0
- data/lib/less/js/test/less/css-guards.less +3 -0
- data/lib/less/js/test/less/detached-rulesets.less +103 -0
- data/lib/less/js/test/less/errors/at-rules-undefined-var.less +4 -0
- data/lib/less/js/test/less/errors/at-rules-undefined-var.txt +4 -0
- data/lib/less/js/test/less/errors/detached-ruleset-1.less +6 -0
- data/lib/less/js/test/less/errors/detached-ruleset-1.txt +4 -0
- data/lib/less/js/test/less/errors/detached-ruleset-2.less +6 -0
- data/lib/less/js/test/less/errors/detached-ruleset-2.txt +4 -0
- data/lib/less/js/test/less/errors/detached-ruleset-3.less +4 -0
- data/lib/less/js/test/less/errors/detached-ruleset-3.txt +4 -0
- data/lib/less/js/test/less/errors/detached-ruleset-4.less +5 -0
- data/lib/less/js/test/less/errors/detached-ruleset-4.txt +3 -0
- data/lib/less/js/test/less/errors/detached-ruleset-5.less +4 -0
- data/lib/less/js/test/less/errors/detached-ruleset-5.txt +3 -0
- data/lib/less/js/test/less/errors/detached-ruleset-6.less +5 -0
- data/lib/less/js/test/less/errors/detached-ruleset-6.txt +4 -0
- data/lib/less/js/test/less/errors/mixin-not-visible-in-scope-1.less +9 -0
- data/lib/less/js/test/less/errors/mixin-not-visible-in-scope-1.txt +4 -0
- data/lib/less/js/test/less/errors/percentage-missing-space.less +3 -0
- data/lib/less/js/test/less/errors/percentage-missing-space.txt +4 -0
- data/lib/less/js/test/less/functions.less +25 -7
- data/lib/less/js/test/less/import-reference.less +7 -4
- data/lib/less/js/test/less/import/import-reference.less +8 -0
- data/lib/less/js/test/less/merge.less +20 -1
- data/lib/less/js/test/less/mixins-guards.less +7 -1
- data/lib/less/js/test/less/mixins-pattern.less +3 -0
- data/lib/less/js/test/less/scope.less +25 -0
- data/lib/less/js/test/less/variables-in-at-rules.less +20 -0
- data/lib/less/version.rb +1 -1
- metadata +39 -2
data/lib/less/js/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "less",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.7.0",
|
4
4
|
"description": "Leaner CSS",
|
5
5
|
"homepage": "http://lesscss.org",
|
6
6
|
"author": {
|
@@ -34,31 +34,31 @@
|
|
34
34
|
"main": "./dist/less-1.6.3.js"
|
35
35
|
},
|
36
36
|
"engines": {
|
37
|
-
"node": ">=0.
|
37
|
+
"node": ">=0.8.0"
|
38
38
|
},
|
39
39
|
"scripts": {
|
40
40
|
"test": "grunt test"
|
41
41
|
},
|
42
42
|
"optionalDependencies": {
|
43
43
|
"mime": "1.2.x",
|
44
|
-
"request": ">=2.
|
44
|
+
"request": ">=2.33.0",
|
45
45
|
"mkdirp": "~0.3.5",
|
46
|
-
"clean-css": "2.
|
46
|
+
"clean-css": "2.1.x",
|
47
47
|
"source-map": "0.1.x"
|
48
48
|
},
|
49
49
|
"devDependencies": {
|
50
50
|
"diff": "~1.0",
|
51
|
-
"grunt": "~0.4.
|
51
|
+
"grunt": "~0.4.2",
|
52
52
|
"grunt-contrib-clean": "~0.5.0",
|
53
53
|
"grunt-contrib-concat": "~0.3.0",
|
54
|
-
"grunt-contrib-connect": "~0.
|
54
|
+
"grunt-contrib-connect": "~0.6.0",
|
55
55
|
"grunt-contrib-jasmine": "~0.5.2",
|
56
|
-
"grunt-contrib-jshint": "~0.
|
57
|
-
"grunt-contrib-uglify": "~0.2
|
58
|
-
"grunt-shell": "~0.
|
59
|
-
"http-server": "~0.
|
60
|
-
"matchdep": "~0.
|
61
|
-
"time-grunt": "~0.
|
56
|
+
"grunt-contrib-jshint": "~0.8.0",
|
57
|
+
"grunt-contrib-uglify": "~0.3.2",
|
58
|
+
"grunt-shell": "~0.6.4",
|
59
|
+
"http-server": "~0.6.1",
|
60
|
+
"matchdep": "~0.3.0",
|
61
|
+
"time-grunt": "~0.2.9"
|
62
62
|
},
|
63
63
|
"keywords": [
|
64
64
|
"compile less",
|
@@ -85,4 +85,4 @@
|
|
85
85
|
"variables in css",
|
86
86
|
"css less"
|
87
87
|
]
|
88
|
-
}
|
88
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
@charset "UTF-8";
|
2
|
-
/* line
|
3
|
-
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\
|
2
|
+
/* line 1, {pathimport}test.less */
|
3
|
+
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\000031}}
|
4
4
|
/* @charset "ISO-8859-1"; */
|
5
5
|
/* line 23, {pathimport}test.less */
|
6
6
|
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\0000323}}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
@charset "UTF-8";
|
2
|
-
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\
|
2
|
+
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\000031}}
|
3
3
|
/* @charset "ISO-8859-1"; */
|
4
4
|
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\0000323}}
|
5
5
|
.tst3 {
|
@@ -0,0 +1,71 @@
|
|
1
|
+
.wrap-selector {
|
2
|
+
color: black;
|
3
|
+
one: 1px;
|
4
|
+
four: magic-frame;
|
5
|
+
visible-one: visible;
|
6
|
+
visible-two: visible;
|
7
|
+
}
|
8
|
+
.wrap-selector {
|
9
|
+
color: red;
|
10
|
+
visible-one: visible;
|
11
|
+
visible-two: visible;
|
12
|
+
}
|
13
|
+
.wrap-selector {
|
14
|
+
color: black;
|
15
|
+
background: white;
|
16
|
+
visible-one: visible;
|
17
|
+
visible-two: visible;
|
18
|
+
}
|
19
|
+
header {
|
20
|
+
background: blue;
|
21
|
+
}
|
22
|
+
@media screen and (min-width: 1200) {
|
23
|
+
header {
|
24
|
+
background: red;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
html.lt-ie9 header {
|
28
|
+
background: red;
|
29
|
+
}
|
30
|
+
.wrap-selector {
|
31
|
+
test: extra-wrap;
|
32
|
+
visible-one: visible;
|
33
|
+
visible-two: visible;
|
34
|
+
}
|
35
|
+
.wrap-selector .wrap-selector {
|
36
|
+
test: wrapped-twice;
|
37
|
+
visible-one: visible;
|
38
|
+
visible-two: visible;
|
39
|
+
}
|
40
|
+
.wrap-selector {
|
41
|
+
test-func: 90;
|
42
|
+
test-arithmetic: 18px;
|
43
|
+
visible-one: visible;
|
44
|
+
visible-two: visible;
|
45
|
+
}
|
46
|
+
.without-mixins {
|
47
|
+
b: 1;
|
48
|
+
}
|
49
|
+
@media (orientation: portrait) and tv {
|
50
|
+
.my-selector {
|
51
|
+
background-color: black;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
@media (orientation: portrait) and widescreen and print and tv {
|
55
|
+
.triple-wrapped-mq {
|
56
|
+
triple: true;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
@media (orientation: portrait) and widescreen and tv {
|
60
|
+
.triple-wrapped-mq {
|
61
|
+
triple: true;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
@media (orientation: portrait) and tv {
|
65
|
+
.triple-wrapped-mq {
|
66
|
+
triple: true;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
.a {
|
70
|
+
test: test;
|
71
|
+
}
|
@@ -24,7 +24,12 @@
|
|
24
24
|
luma-blue: 7%;
|
25
25
|
luma-yellow: 93%;
|
26
26
|
luma-cyan: 79%;
|
27
|
-
luma-
|
27
|
+
luma-differs-from-luminance: 24%;
|
28
|
+
luminance-white: 100%;
|
29
|
+
luminance-black: 0%;
|
30
|
+
luminance-black-alpha: 0%;
|
31
|
+
luminance-red: 21%;
|
32
|
+
luminance-differs-from-luma: 36%;
|
28
33
|
contrast-filter: contrast(30%);
|
29
34
|
saturate-filter: saturate(5%);
|
30
35
|
contrast-white: #000000;
|
@@ -45,13 +50,24 @@
|
|
45
50
|
contrast-dark-thresh-per: #eeeeee;
|
46
51
|
contrast-high-thresh-per: #eeeeee;
|
47
52
|
contrast-low-thresh-per: #111111;
|
53
|
+
replace: "Hello, World!";
|
54
|
+
replace-captured: "This is a new string.";
|
55
|
+
replace-with-flags: "2 + 2 = 4";
|
56
|
+
replace-single-quoted: 'foo-2';
|
57
|
+
replace-escaped-string: bar-2;
|
58
|
+
replace-keyword: baz-2;
|
48
59
|
format: "rgb(32, 128, 64)";
|
49
60
|
format-string: "hello world";
|
50
61
|
format-multiple: "hello earth 2";
|
51
62
|
format-url-encode: "red is %23ff0000";
|
63
|
+
format-single-quoted: 'hello single world';
|
64
|
+
format-escaped-string: hello escaped world;
|
52
65
|
eformat: rgb(32, 128, 64);
|
53
66
|
unitless: 12;
|
54
67
|
unit: 14em;
|
68
|
+
unitpercentage: 100%;
|
69
|
+
get-unit: px;
|
70
|
+
get-unit-empty: ;
|
55
71
|
hue: 98;
|
56
72
|
saturation: 12%;
|
57
73
|
lightness: 95%;
|
@@ -82,10 +98,11 @@
|
|
82
98
|
pow: 64;
|
83
99
|
pow: 27;
|
84
100
|
min: 0;
|
85
|
-
min:
|
86
|
-
min:
|
101
|
+
min: 5;
|
102
|
+
min: 1pt;
|
103
|
+
min: 3mm;
|
87
104
|
max: 3;
|
88
|
-
max:
|
105
|
+
max: 5em;
|
89
106
|
percentage: 20%;
|
90
107
|
color: #ff0011;
|
91
108
|
tint: #898989;
|
@@ -1,7 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
input[type="text"].class#id[attr=32]:not(1) {
|
2
|
+
color: white;
|
3
|
+
}
|
4
|
+
div#id.class[a=1][b=2].class:not(1) {
|
5
|
+
color: white;
|
6
|
+
}
|
7
|
+
@media print {
|
8
|
+
.class {
|
9
|
+
color: blue;
|
10
|
+
}
|
11
|
+
.class .sub {
|
12
|
+
width: 42;
|
13
|
+
}
|
14
|
+
}
|
5
15
|
.visible {
|
6
16
|
color: red;
|
7
17
|
}
|
@@ -47,3 +57,12 @@
|
|
47
57
|
.visible {
|
48
58
|
extend: test;
|
49
59
|
}
|
60
|
+
.test-mediaq-import {
|
61
|
+
color: green;
|
62
|
+
test: 340px;
|
63
|
+
}
|
64
|
+
@media (max-size: 450px) {
|
65
|
+
.test-mediaq-import {
|
66
|
+
color: red;
|
67
|
+
}
|
68
|
+
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
.zero {
|
2
2
|
variadic: true;
|
3
|
+
named-variadic: true;
|
3
4
|
zero: 0;
|
4
5
|
one: 1;
|
5
6
|
two: 2;
|
@@ -7,6 +8,7 @@
|
|
7
8
|
}
|
8
9
|
.one {
|
9
10
|
variadic: true;
|
11
|
+
named-variadic: true;
|
10
12
|
one: 1;
|
11
13
|
one-req: 1;
|
12
14
|
two: 2;
|
@@ -14,11 +16,13 @@
|
|
14
16
|
}
|
15
17
|
.two {
|
16
18
|
variadic: true;
|
19
|
+
named-variadic: true;
|
17
20
|
two: 2;
|
18
21
|
three: 3;
|
19
22
|
}
|
20
23
|
.three {
|
21
24
|
variadic: true;
|
25
|
+
named-variadic: true;
|
22
26
|
three-req: 3;
|
23
27
|
three: 3;
|
24
28
|
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
@namespace less "http://lesscss.org";
|
3
|
+
@keyframes enlarger {
|
4
|
+
from {
|
5
|
+
font-size: 12px;
|
6
|
+
}
|
7
|
+
to {
|
8
|
+
font-size: 15px;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
@-webkit-keyframes reducer {
|
12
|
+
from {
|
13
|
+
font-size: 13px;
|
14
|
+
}
|
15
|
+
to {
|
16
|
+
font-size: 10px;
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,103 @@
|
|
1
|
+
@ruleset: {
|
2
|
+
color: black;
|
3
|
+
background: white;
|
4
|
+
};
|
5
|
+
|
6
|
+
@a: 1px;
|
7
|
+
.wrap-mixin(@ruleset) {
|
8
|
+
@a: hidden and if you see this in the output its a bug;
|
9
|
+
@b: visible;
|
10
|
+
@d: magic-frame; // same behaviour as mixin calls - falls back to this frame
|
11
|
+
.wrap-selector {
|
12
|
+
@c: visible;
|
13
|
+
@ruleset();
|
14
|
+
visible-one: @b;
|
15
|
+
visible-two: @c;
|
16
|
+
}
|
17
|
+
};
|
18
|
+
|
19
|
+
.wrap-mixin({
|
20
|
+
color: black;
|
21
|
+
one: @a;
|
22
|
+
@b: hidden and if you see this in the output its a bug;
|
23
|
+
@c: hidden and if you see this in the output its a bug;
|
24
|
+
four: @d;
|
25
|
+
});
|
26
|
+
|
27
|
+
.wrap-mixin(@ruleset: {
|
28
|
+
color: red;
|
29
|
+
});
|
30
|
+
|
31
|
+
.wrap-mixin(@ruleset);
|
32
|
+
|
33
|
+
.desktop-and-old-ie(@rules) {
|
34
|
+
@media screen and (min-width: 1200) { @rules(); }
|
35
|
+
html.lt-ie9 & { @rules(); }
|
36
|
+
}
|
37
|
+
|
38
|
+
header {
|
39
|
+
background: blue;
|
40
|
+
|
41
|
+
.desktop-and-old-ie({
|
42
|
+
background: red;
|
43
|
+
});
|
44
|
+
}
|
45
|
+
|
46
|
+
.wrap-mixin-calls-wrap(@ruleset) {
|
47
|
+
.wrap-mixin(@ruleset);
|
48
|
+
};
|
49
|
+
|
50
|
+
.wrap-mixin({
|
51
|
+
test: extra-wrap;
|
52
|
+
.wrap-mixin-calls-wrap({
|
53
|
+
test: wrapped-twice;
|
54
|
+
});
|
55
|
+
});
|
56
|
+
|
57
|
+
.wrap-mixin({
|
58
|
+
test-func: unit(90px);
|
59
|
+
test-arithmetic: unit((9+9), px);
|
60
|
+
});
|
61
|
+
// without mixins
|
62
|
+
@ruleset-2: {
|
63
|
+
b: 1;
|
64
|
+
};
|
65
|
+
.without-mixins {
|
66
|
+
@ruleset-2();
|
67
|
+
}
|
68
|
+
@my-ruleset: {
|
69
|
+
.my-selector {
|
70
|
+
@media tv {
|
71
|
+
background-color: black;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
};
|
75
|
+
@media (orientation:portrait) {
|
76
|
+
@my-ruleset();
|
77
|
+
.wrap-media-mixin({
|
78
|
+
@media tv {
|
79
|
+
.triple-wrapped-mq {
|
80
|
+
triple: true;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
});
|
84
|
+
}
|
85
|
+
.wrap-media-mixin(@ruleset) {
|
86
|
+
@media widescreen {
|
87
|
+
@media print {
|
88
|
+
@ruleset();
|
89
|
+
}
|
90
|
+
@ruleset();
|
91
|
+
}
|
92
|
+
@ruleset();
|
93
|
+
}
|
94
|
+
// unlocking mixins
|
95
|
+
@my-mixins: {
|
96
|
+
.mixin() {
|
97
|
+
test: test;
|
98
|
+
}
|
99
|
+
};
|
100
|
+
@my-mixins();
|
101
|
+
.a {
|
102
|
+
.mixin();
|
103
|
+
}
|