less 3.0.0-pre.2 → 3.0.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/.eslintrc.json +88 -0
- package/.github/stale.yml +17 -0
- package/.project +17 -0
- package/.settings/org.eclipse.buildship.core.prefs +2 -0
- package/.travis.yml +22 -3
- package/.vscode/launch.json +14 -0
- package/CHANGELOG.md +27 -0
- package/Gruntfile.js +191 -86
- package/README.md +5 -7
- package/appveyor.yml +9 -10
- package/bin/lessc +37 -50
- package/dist/less.js +1357 -1269
- package/dist/less.min.js +7 -7
- package/lib/less/contexts.js +20 -16
- package/lib/less/default-options.js +65 -0
- package/lib/less/environment/abstract-file-manager.js +13 -14
- package/lib/less/environment/abstract-plugin-loader.js +45 -36
- package/lib/less/environment/environment.js +5 -0
- package/lib/less/functions/boolean.js +15 -0
- package/lib/less/functions/color.js +54 -24
- package/lib/less/functions/data-uri.js +5 -2
- package/lib/less/functions/function-registry.js +1 -1
- package/lib/less/functions/index.js +2 -1
- package/lib/less/functions/number.js +2 -2
- package/lib/less/functions/string.js +2 -2
- package/lib/less/functions/svg.js +4 -4
- package/lib/less/import-manager.js +41 -29
- package/lib/less/index.js +28 -3
- package/lib/less/less-error.js +112 -13
- package/lib/less/parse.js +18 -15
- package/lib/less/parser/parser-input.js +4 -4
- package/lib/less/parser/parser.js +208 -114
- package/lib/less/plugin-manager.js +8 -33
- package/lib/less/render.js +6 -2
- package/lib/less/source-map-builder.js +3 -0
- package/lib/less/source-map-output.js +13 -8
- package/lib/less/transform-tree.js +2 -2
- package/lib/less/tree/anonymous.js +4 -1
- package/lib/less/tree/atrule.js +7 -6
- package/lib/less/tree/call.js +25 -3
- package/lib/less/tree/color.js +2 -2
- package/lib/less/tree/debug-info.js +1 -1
- package/lib/less/tree/declaration.js +6 -5
- package/lib/less/tree/dimension.js +4 -1
- package/lib/less/tree/extend.js +2 -2
- package/lib/less/tree/import.js +17 -9
- package/lib/less/tree/index.js +3 -7
- package/lib/less/tree/js-eval-node.js +1 -1
- package/lib/less/tree/media.js +3 -14
- package/lib/less/tree/mixin-definition.js +3 -3
- package/lib/less/tree/node.js +9 -6
- package/lib/less/tree/operation.js +1 -1
- package/lib/less/tree/property.js +70 -0
- package/lib/less/tree/quoted.js +11 -10
- package/lib/less/tree/ruleset.js +115 -71
- package/lib/less/tree/selector.js +38 -23
- package/lib/less/tree/unit.js +1 -1
- package/lib/less/tree/value.js +6 -1
- package/lib/less/tree/{ruleset-call.js → variable-call.js} +5 -5
- package/lib/less/tree/variable.js +6 -6
- package/lib/less/utils.js +40 -0
- package/lib/less/visitors/extend-visitor.js +14 -14
- package/lib/less/visitors/import-visitor.js +2 -2
- package/lib/less/visitors/join-selector-visitor.js +1 -1
- package/lib/less/visitors/to-css-visitor.js +51 -84
- package/lib/less/visitors/visitor.js +15 -15
- package/lib/less-browser/bootstrap.js +21 -5
- package/lib/less-browser/cache.js +2 -2
- package/lib/less-browser/error-reporting.js +5 -5
- package/lib/less-browser/file-manager.js +27 -35
- package/lib/less-browser/index.js +12 -17
- package/lib/less-browser/plugin-loader.js +8 -45
- package/lib/less-browser/utils.js +1 -1
- package/lib/less-node/file-manager.js +99 -69
- package/lib/less-node/fs.js +1 -1
- package/lib/less-node/image-size.js +2 -2
- package/lib/less-node/index.js +7 -57
- package/lib/less-node/lessc-helper.js +38 -38
- package/lib/less-node/plugin-loader.js +18 -79
- package/lib/less-node/url-file-manager.js +1 -1
- package/lib/less-rhino/index.js +29 -44
- package/package.json +16 -9
- package/test/browser/common.js +54 -18
- package/test/browser/css/plugin/plugin.css +3 -0
- package/test/browser/jasmine-jsreporter.js +4 -4
- package/test/browser/less/plugin/plugin.js +7 -0
- package/test/browser/less/plugin/plugin.less +4 -0
- package/test/browser/less.js +11685 -13
- package/test/browser/runner-browser-options.js +6 -1
- package/test/browser/runner-filemanagerPlugin-options.js +3 -2
- package/test/browser/runner-legacy-options.js +2 -1
- package/test/browser/runner-main-options.js +0 -1
- package/test/browser/runner-modify-vars-spec.js +2 -2
- package/test/browser/test-runner-template.tmpl +38 -14
- package/test/copy-bom.js +1 -1
- package/test/css/calc.css +5 -0
- package/test/css/comments2.css +1 -1
- package/test/css/compression/compression.css +1 -1
- package/test/css/css-grid.css +11 -0
- package/test/css/debug/linenumbers-all.css +0 -1
- package/test/css/debug/linenumbers-comments.css +0 -1
- package/test/css/debug/linenumbers-mediaquery.css +0 -1
- package/test/css/functions.css +16 -3
- package/test/css/import-module.css +9 -0
- package/test/css/import.css +0 -1
- package/test/css/legacy/legacy.css +1 -1
- package/test/css/merge.css +5 -4
- package/test/css/plugin-module.css +1 -0
- package/test/css/plugin.css +20 -0
- package/test/css/property-accessors.css +49 -0
- package/test/css/{css.css → strict-math/css.css} +0 -0
- package/test/css/{mixins-args.css → strict-math/mixins-args.css} +0 -0
- package/test/css/{parens.css → strict-math/parens.css} +0 -0
- package/test/import-module/one/1.less +3 -0
- package/test/import-module/one/two/2.less +3 -0
- package/test/import-module/one/two/three/3.less +3 -0
- package/test/import-module/package.json +11 -0
- package/test/index.js +55 -49
- package/test/less/calc.less +7 -0
- package/test/less/css-grid.less +15 -0
- package/test/less/detached-rulesets.less +2 -2
- package/test/less/errors/color-invalid-hex-code.less +1 -0
- package/test/less/errors/color-invalid-hex-code.txt +1 -1
- package/test/less/errors/color-invalid-hex-code2.less +1 -0
- package/test/less/errors/color-invalid-hex-code2.txt +1 -1
- package/test/less/errors/import-missing.txt +1 -1
- package/test/less/errors/plugin/plugin-error-2.js +5 -0
- package/test/less/errors/plugin/plugin-error-3.js +5 -0
- package/test/less/errors/plugin/plugin-error.js +1 -0
- package/test/less/errors/plugin-1.less +1 -0
- package/test/less/errors/plugin-1.txt +2 -0
- package/test/less/errors/plugin-2.less +1 -0
- package/test/less/errors/plugin-2.txt +5 -0
- package/test/less/errors/plugin-3.less +1 -0
- package/test/less/errors/plugin-3.txt +5 -0
- package/test/less/functions.less +18 -0
- package/test/less/import-module.less +3 -0
- package/test/less/import.less +0 -2
- package/test/less/legacy/legacy.less +1 -1
- package/test/less/media.less +2 -2
- package/test/less/merge.less +6 -3
- package/test/less/plugin/plugin-collection.js +9 -0
- package/test/less/plugin/plugin-local.js +2 -2
- package/test/less/plugin/plugin-scope1.js +3 -0
- package/test/less/plugin/plugin-scope2.js +3 -0
- package/test/less/plugin/plugin-simple.js +7 -0
- package/test/less/plugin/plugin-tree-nodes.js +33 -31
- package/test/less/plugin-module.less +7 -0
- package/test/less/plugin.less +33 -3
- package/test/less/property-accessors.less +67 -0
- package/test/less/root-registry/file.less +1 -0
- package/test/less/root-registry/root.less +3 -0
- package/test/less/{css.less → strict-math/css.less} +0 -0
- package/test/less/{mixins-args.less → strict-math/mixins-args.less} +0 -0
- package/test/less/{parens.less → strict-math/parens.less} +0 -0
- package/test/less-bom/calc.less +7 -0
- package/test/less-bom/css-grid.less +15 -0
- package/test/less-bom/detached-rulesets.less +2 -2
- package/test/less-bom/errors/color-invalid-hex-code.less +1 -0
- package/test/less-bom/errors/color-invalid-hex-code.txt +1 -1
- package/test/less-bom/errors/color-invalid-hex-code2.less +1 -0
- package/test/less-bom/errors/color-invalid-hex-code2.txt +1 -1
- package/test/less-bom/errors/import-missing.txt +1 -1
- package/test/less-bom/errors/plugin/plugin-error-2.js +5 -0
- package/test/less-bom/errors/plugin/plugin-error-3.js +5 -0
- package/test/less-bom/errors/plugin/plugin-error.js +1 -0
- package/test/less-bom/errors/plugin-1.less +1 -0
- package/test/less-bom/errors/plugin-1.txt +2 -0
- package/test/less-bom/errors/plugin-2.less +1 -0
- package/test/less-bom/errors/plugin-2.txt +5 -0
- package/test/less-bom/errors/plugin-3.less +1 -0
- package/test/less-bom/errors/plugin-3.txt +5 -0
- package/test/less-bom/functions.less +18 -0
- package/test/less-bom/import-module.less +3 -0
- package/test/less-bom/import.less +0 -2
- package/test/less-bom/legacy/legacy.less +1 -1
- package/test/less-bom/media.less +2 -2
- package/test/less-bom/merge.less +6 -3
- package/test/less-bom/plugin/plugin-collection.js +9 -0
- package/test/less-bom/plugin/plugin-local.js +2 -2
- package/test/less-bom/plugin/plugin-scope1.js +3 -0
- package/test/less-bom/plugin/plugin-scope2.js +3 -0
- package/test/less-bom/plugin/plugin-simple.js +7 -0
- package/test/less-bom/plugin/plugin-tree-nodes.js +33 -31
- package/test/less-bom/plugin-module.less +7 -0
- package/test/less-bom/plugin.less +33 -3
- package/test/less-bom/property-accessors.less +67 -0
- package/test/less-bom/root-registry/file.less +1 -0
- package/test/less-bom/root-registry/root.less +3 -0
- package/test/less-bom/{css.less → strict-math/css.less} +0 -0
- package/test/less-bom/{mixins-args.less → strict-math/mixins-args.less} +0 -0
- package/test/less-bom/{parens.less → strict-math/parens.less} +0 -0
- package/test/less-test.js +75 -17
- package/test/modify-vars.js +1 -1
- package/test/plugins/visitor/index.js +1 -1
- package/.jscsrc +0 -73
- package/.jshintrc +0 -11
- package/lib/less/tree/alpha.js +0 -28
- package/lib/less/tree/directive.js +0 -12
- package/lib/less/tree/rule.js +0 -12
- package/test/less/errors/functions-2-alpha.less +0 -2
- package/test/less/errors/functions-2-alpha.txt +0 -3
- package/test/less-bom/errors/functions-2-alpha.less +0 -2
- package/test/less-bom/errors/functions-2-alpha.txt +0 -3
- package/test/sourcemaps/maps/import-map.map +0 -1
package/test/less/functions.less
CHANGED
|
@@ -230,3 +230,21 @@ html {
|
|
|
230
230
|
color: mix(blue, @color1, 50%);
|
|
231
231
|
color: mix(blue, @color2, 50%);
|
|
232
232
|
}
|
|
233
|
+
|
|
234
|
+
#boolean {
|
|
235
|
+
a: boolean(not(2 < 1));
|
|
236
|
+
b: boolean(not(2 > 1) and (true));
|
|
237
|
+
c: boolean(not(boolean((true))));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
#if {
|
|
241
|
+
a: if(not(false), 1, 2);
|
|
242
|
+
b: if(not(true), 1, 2);
|
|
243
|
+
@1: if(not(false), {c: 3}, {d: 4}); @1();
|
|
244
|
+
|
|
245
|
+
e: if(not(true), 5);
|
|
246
|
+
@f: boolean((3 = 4));
|
|
247
|
+
f: if(not(@f), 6);
|
|
248
|
+
|
|
249
|
+
if((false), {g: 7}); /* results in void */
|
|
250
|
+
}
|
package/test/less/import.less
CHANGED
package/test/less/media.less
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
@ratio_large: 16;
|
|
24
24
|
@ratio_small: 9;
|
|
25
25
|
|
|
26
|
-
@media all and (device-aspect-ratio: @ratio_large / @ratio_small) {
|
|
26
|
+
@media all and (device-aspect-ratio: ~"@{ratio_large} / @{ratio_small}") {
|
|
27
27
|
body { max-width: 800px; }
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -177,7 +177,7 @@ body {
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
@media (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (min-resolution: 2dppx), (min-resolution: 128dpcm) {
|
|
180
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: ~"2/1"), (min-resolution: 2dppx), (min-resolution: 128dpcm) {
|
|
181
181
|
.b {
|
|
182
182
|
background: red;
|
|
183
183
|
}
|
package/test/less/merge.less
CHANGED
|
@@ -36,17 +36,20 @@
|
|
|
36
36
|
.first-background();
|
|
37
37
|
}
|
|
38
38
|
.test4 {
|
|
39
|
-
// Won't merge values from sources that merked as !important, for backwards compatibility with css
|
|
40
39
|
.first-transform();
|
|
41
40
|
.fifth-transform();
|
|
42
41
|
}
|
|
43
42
|
.test5 {
|
|
44
|
-
// Won't merge values from mixins that merked as !important, for backwards compatibility with css
|
|
45
43
|
.first-transform();
|
|
46
44
|
.second-transform() !important;
|
|
47
45
|
}
|
|
48
46
|
.test6 {
|
|
49
|
-
|
|
47
|
+
.second-transform();
|
|
48
|
+
}
|
|
49
|
+
.test7 {
|
|
50
|
+
// inherit !important from merged subrules
|
|
51
|
+
.second-transform();
|
|
52
|
+
.second-transform() !important;
|
|
50
53
|
.second-transform();
|
|
51
54
|
}
|
|
52
55
|
|
|
@@ -1,80 +1,82 @@
|
|
|
1
1
|
functions.addMultiple({
|
|
2
2
|
|
|
3
3
|
"test-comment": function() {
|
|
4
|
-
return
|
|
4
|
+
return less.combinator(' ');
|
|
5
5
|
},
|
|
6
|
-
"test-
|
|
7
|
-
return
|
|
6
|
+
"test-atrule": function(arg1, arg2) {
|
|
7
|
+
return less.atrule(arg1.value, arg2.value);
|
|
8
8
|
},
|
|
9
9
|
"test-extend": function() {
|
|
10
|
-
//TODO
|
|
10
|
+
// TODO
|
|
11
11
|
},
|
|
12
12
|
"test-import": function() {
|
|
13
|
-
//TODO
|
|
13
|
+
// TODO
|
|
14
14
|
},
|
|
15
15
|
"test-media": function() {
|
|
16
|
-
//TODO
|
|
16
|
+
// TODO
|
|
17
17
|
},
|
|
18
18
|
"test-mixin-call": function() {
|
|
19
|
-
//TODO
|
|
19
|
+
// TODO
|
|
20
20
|
},
|
|
21
21
|
"test-mixin-definition": function() {
|
|
22
|
-
//TODO
|
|
22
|
+
// TODO
|
|
23
23
|
},
|
|
24
24
|
"test-ruleset-call": function() {
|
|
25
|
-
return
|
|
25
|
+
return less.combinator(' ');
|
|
26
26
|
},
|
|
27
|
-
// Functions must return something
|
|
28
|
-
"test-undefined": function() {
|
|
29
|
-
|
|
30
|
-
// These cause root errors
|
|
31
|
-
"test-alpha": function() {
|
|
32
|
-
return new tree.Alpha(30);
|
|
27
|
+
// Functions must return something, even if it's false/true
|
|
28
|
+
"test-undefined": function() {
|
|
29
|
+
return;
|
|
33
30
|
},
|
|
31
|
+
"test-collapse": function() {
|
|
32
|
+
return true;
|
|
33
|
+
},
|
|
34
|
+
// These cause root errors
|
|
34
35
|
"test-assignment": function() {
|
|
35
|
-
return
|
|
36
|
+
return less.assignment("bird", "robin");
|
|
36
37
|
},
|
|
37
38
|
"test-attribute": function() {
|
|
38
|
-
return
|
|
39
|
+
return less.attribute("foo", "=", "bar");
|
|
39
40
|
},
|
|
40
41
|
"test-call": function() {
|
|
41
|
-
return
|
|
42
|
+
return less.call("foo");
|
|
42
43
|
},
|
|
43
44
|
"test-color": function() {
|
|
44
|
-
return
|
|
45
|
+
return less.color([50, 50, 50]);
|
|
45
46
|
},
|
|
46
47
|
"test-condition": function() {
|
|
47
|
-
return
|
|
48
|
+
return less.condition('<', less.value([0]), less.value([1]));
|
|
48
49
|
},
|
|
49
50
|
"test-detached-ruleset" : function() {
|
|
50
|
-
var
|
|
51
|
-
return
|
|
51
|
+
var decl = less.declaration('prop', 'value');
|
|
52
|
+
return less.detachedruleset(less.ruleset("", [ decl ]));
|
|
52
53
|
},
|
|
53
54
|
"test-dimension": function() {
|
|
54
|
-
return
|
|
55
|
+
return less.dimension(1, 'px');
|
|
55
56
|
},
|
|
56
57
|
"test-element": function() {
|
|
57
|
-
return
|
|
58
|
+
return less.element('+', 'a');
|
|
58
59
|
},
|
|
59
60
|
"test-expression": function() {
|
|
60
|
-
return
|
|
61
|
+
return less.expression([1, 2, 3]);
|
|
61
62
|
},
|
|
62
63
|
"test-keyword": function() {
|
|
63
|
-
return
|
|
64
|
+
return less.keyword('foo');
|
|
64
65
|
},
|
|
65
66
|
"test-operation": function() {
|
|
66
|
-
return
|
|
67
|
+
return less.operation('+', [1, 2]);
|
|
67
68
|
},
|
|
68
69
|
"test-quoted": function() {
|
|
69
|
-
return
|
|
70
|
+
return less.quoted('"', 'foo');
|
|
70
71
|
},
|
|
71
72
|
"test-selector": function() {
|
|
72
|
-
|
|
73
|
+
var sel = less.selector('.a.b');
|
|
74
|
+
return sel;
|
|
73
75
|
},
|
|
74
76
|
"test-url": function() {
|
|
75
|
-
return
|
|
77
|
+
return less.url('http://google.com');
|
|
76
78
|
},
|
|
77
79
|
"test-value": function() {
|
|
78
|
-
return
|
|
80
|
+
return less.value([1]);
|
|
79
81
|
}
|
|
80
82
|
});
|
package/test/less/plugin.less
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// importing plugin globally
|
|
2
|
-
@plugin "
|
|
2
|
+
@plugin "plugin/plugin-global";
|
|
3
3
|
|
|
4
4
|
// transitively include plugins from importing another sheet
|
|
5
5
|
@import "./plugin/plugin-transitive";
|
|
@@ -86,8 +86,38 @@
|
|
|
86
86
|
.root {
|
|
87
87
|
@ruleset2();
|
|
88
88
|
}
|
|
89
|
+
.test-empty {
|
|
90
|
+
val1: foo;
|
|
91
|
+
test-collapse();
|
|
92
|
+
val2: foo;
|
|
93
|
+
}
|
|
94
|
+
.test-simple {
|
|
95
|
+
@plugin "./plugin/plugin-simple";
|
|
96
|
+
value: pi-anon();
|
|
97
|
+
value: (pi() * 2);
|
|
98
|
+
}
|
|
99
|
+
.test-conflicts {
|
|
100
|
+
@plugin "./plugin/plugin-scope1";
|
|
101
|
+
value: foo();
|
|
102
|
+
}
|
|
103
|
+
.test-conflicts {
|
|
104
|
+
@plugin "./plugin/plugin-scope2";
|
|
105
|
+
value: foo();
|
|
106
|
+
}
|
|
107
|
+
.test-conflicts {
|
|
108
|
+
@plugin "./plugin/plugin-scope1";
|
|
109
|
+
value: foo();
|
|
110
|
+
}
|
|
111
|
+
.test-collection {
|
|
112
|
+
@plugin "./plugin/plugin-collection";
|
|
113
|
+
@var: 32;
|
|
114
|
+
store(@var);
|
|
115
|
+
store(5);
|
|
116
|
+
store("bird");
|
|
117
|
+
list: list();
|
|
118
|
+
}
|
|
89
119
|
|
|
90
|
-
test-
|
|
91
|
-
test-
|
|
120
|
+
test-atrule("@charset"; '"utf-8"');
|
|
121
|
+
test-atrule("@arbitrary"; "value after ()");
|
|
92
122
|
|
|
93
123
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
|
|
2
|
+
.block_1 {
|
|
3
|
+
color: red;
|
|
4
|
+
background-color: $color;
|
|
5
|
+
@width: 50px;
|
|
6
|
+
width: @width;
|
|
7
|
+
height: ($width / 2);
|
|
8
|
+
@color: red;
|
|
9
|
+
border: 1px solid lighten($color, 10%);
|
|
10
|
+
&:hover {
|
|
11
|
+
color: $color;
|
|
12
|
+
background-color: $color;
|
|
13
|
+
.mixin1();
|
|
14
|
+
}
|
|
15
|
+
.one {
|
|
16
|
+
background: $color;
|
|
17
|
+
}
|
|
18
|
+
content: "${color}";
|
|
19
|
+
prop: $color;
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.block_2 {
|
|
24
|
+
color: red;
|
|
25
|
+
.two {
|
|
26
|
+
background-color: $color;
|
|
27
|
+
}
|
|
28
|
+
color: blue;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.block_3 {
|
|
32
|
+
color: red;
|
|
33
|
+
.three {
|
|
34
|
+
background-color: $color;
|
|
35
|
+
}
|
|
36
|
+
.mixin2();
|
|
37
|
+
color: blue;
|
|
38
|
+
}
|
|
39
|
+
.block_4 {
|
|
40
|
+
color: red;
|
|
41
|
+
.four {
|
|
42
|
+
background-color: $color;
|
|
43
|
+
}
|
|
44
|
+
color: blue;
|
|
45
|
+
.mixin2();
|
|
46
|
+
}
|
|
47
|
+
// property merging
|
|
48
|
+
a {
|
|
49
|
+
background-color+: red;
|
|
50
|
+
background-color+: foo;
|
|
51
|
+
|
|
52
|
+
&b {
|
|
53
|
+
background: $background-color;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.value_as_property {
|
|
58
|
+
prop1: color;
|
|
59
|
+
${prop1}: #FF0000; // not sure why you'd want to do this, but ok
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.mixin1() {
|
|
63
|
+
color: green;
|
|
64
|
+
}
|
|
65
|
+
.mixin2() {
|
|
66
|
+
color: yellow;
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "utf-8";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.wrapper {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: [col1-start] 9fr [col1-end] 10px [col2-start] 3fr [col2-end];
|
|
4
|
+
grid-template-rows: auto;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.wrapper {
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-columns: 9fr 1.875em 3fr;
|
|
10
|
+
grid-template-rows: auto;
|
|
11
|
+
grid-template-areas:
|
|
12
|
+
"header header header"
|
|
13
|
+
"content . sidebar"
|
|
14
|
+
"footer footer footer";
|
|
15
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
FileError: '{pathhref}file-does-not-exist.less' wasn't found{404status}{node}. Tried - {path}file-does-not-exist.less,{pathrel}file-does-not-exist.less,file-does-not-exist.less{/node} in {path}import-missing.less on line 6, column 1:
|
|
1
|
+
FileError: '{pathhref}file-does-not-exist.less' wasn't found{404status}{node}. Tried - {path}file-does-not-exist.less,{pathrel}file-does-not-exist.less,{nodepath}file-does-not-exist.less,file-does-not-exist.less{/node} in {path}import-missing.less on line 6, column 1:
|
|
2
2
|
5
|
|
3
3
|
6 @import "file-does-not-exist.less";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
throw new Error('Error');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@plugin "plugin/plugin-error";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@plugin "plugin/plugin-error-2";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@plugin "plugin/plugin-error-3";
|
|
@@ -230,3 +230,21 @@ html {
|
|
|
230
230
|
color: mix(blue, @color1, 50%);
|
|
231
231
|
color: mix(blue, @color2, 50%);
|
|
232
232
|
}
|
|
233
|
+
|
|
234
|
+
#boolean {
|
|
235
|
+
a: boolean(not(2 < 1));
|
|
236
|
+
b: boolean(not(2 > 1) and (true));
|
|
237
|
+
c: boolean(not(boolean((true))));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
#if {
|
|
241
|
+
a: if(not(false), 1, 2);
|
|
242
|
+
b: if(not(true), 1, 2);
|
|
243
|
+
@1: if(not(false), {c: 3}, {d: 4}); @1();
|
|
244
|
+
|
|
245
|
+
e: if(not(true), 5);
|
|
246
|
+
@f: boolean((3 = 4));
|
|
247
|
+
f: if(not(@f), 6);
|
|
248
|
+
|
|
249
|
+
if((false), {g: 7}); /* results in void */
|
|
250
|
+
}
|
package/test/less-bom/media.less
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
@ratio_large: 16;
|
|
24
24
|
@ratio_small: 9;
|
|
25
25
|
|
|
26
|
-
@media all and (device-aspect-ratio: @ratio_large / @ratio_small) {
|
|
26
|
+
@media all and (device-aspect-ratio: ~"@{ratio_large} / @{ratio_small}") {
|
|
27
27
|
body { max-width: 800px; }
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -177,7 +177,7 @@ body {
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
@media (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (min-resolution: 2dppx), (min-resolution: 128dpcm) {
|
|
180
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: ~"2/1"), (min-resolution: 2dppx), (min-resolution: 128dpcm) {
|
|
181
181
|
.b {
|
|
182
182
|
background: red;
|
|
183
183
|
}
|
package/test/less-bom/merge.less
CHANGED
|
@@ -36,17 +36,20 @@
|
|
|
36
36
|
.first-background();
|
|
37
37
|
}
|
|
38
38
|
.test4 {
|
|
39
|
-
// Won't merge values from sources that merked as !important, for backwards compatibility with css
|
|
40
39
|
.first-transform();
|
|
41
40
|
.fifth-transform();
|
|
42
41
|
}
|
|
43
42
|
.test5 {
|
|
44
|
-
// Won't merge values from mixins that merked as !important, for backwards compatibility with css
|
|
45
43
|
.first-transform();
|
|
46
44
|
.second-transform() !important;
|
|
47
45
|
}
|
|
48
46
|
.test6 {
|
|
49
|
-
|
|
47
|
+
.second-transform();
|
|
48
|
+
}
|
|
49
|
+
.test7 {
|
|
50
|
+
// inherit !important from merged subrules
|
|
51
|
+
.second-transform();
|
|
52
|
+
.second-transform() !important;
|
|
50
53
|
.second-transform();
|
|
51
54
|
}
|
|
52
55
|
|