less 3.10.3 → 3.11.3
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/.github/FUNDING.yml +12 -0
- package/CHANGELOG.md +509 -711
- package/CONTRIBUTING.md +2 -2
- package/Gruntfile.js +42 -212
- package/README.md +31 -3
- package/bin/lessc +10538 -13511
- package/dist/less.cjs.js +10078 -12936
- package/dist/less.js +10670 -13462
- package/dist/less.min.js +3 -3
- package/dist/less.min.js.map +1 -1
- package/lib/less/contexts.js +1 -1
- package/lib/less/environment/abstract-file-manager.js +1 -1
- package/lib/less/import-manager.js +7 -20
- package/lib/less/index.js +1 -1
- package/lib/less/less-error.js +22 -2
- package/lib/less/parse-tree.js +2 -6
- package/lib/less/parser/parser.js +10 -10
- package/lib/less/tree/debug-info.js +2 -1
- package/lib/less/tree/namespace-value.js +1 -2
- package/lib/less/visitors/visitor.js +10 -2
- package/lib/less-node/file-manager.js +19 -49
- package/lib/lessc.js +3 -22
- package/package.json +21 -16
- package/test/browser/common.js +11 -49
- package/test/browser/generator/benchmark.config.js +50 -0
- package/test/browser/generator/generate.js +78 -0
- package/test/browser/generator/runner.config.js +180 -0
- package/test/browser/generator/runner.js +2 -0
- package/test/browser/generator/template.js +83 -0
- package/test/browser/runner-browser-options.js +0 -6
- package/test/browser/runner-browser-spec.js +1 -1
- package/test/browser/runner-main-spec.js +1 -1
- package/test/browser/runner-modify-vars-spec.js +1 -1
- package/test/browser/runner-production-spec.js +1 -1
- package/test/css/calc.css +9 -0
- package/test/css/comments.css +1 -1
- package/test/css/css-3.css +5 -5
- package/test/css/css-guards.css +1 -1
- package/test/css/debug/linenumbers-all.css +5 -5
- package/test/css/debug/linenumbers-comments.css +5 -5
- package/test/css/debug/linenumbers-mediaquery.css +5 -5
- package/test/css/extend-chaining.css +3 -3
- package/test/css/extend-media.css +1 -1
- package/test/css/extend-nest.css +1 -1
- package/test/css/filemanagerPlugin/filemanager.css +1 -1
- package/test/css/functions-each.css +1 -1
- package/test/css/import-once.css +2 -2
- package/test/css/import-reference-issues.css +1 -1
- package/test/css/import-reference.css +6 -6
- package/test/css/import.css +1 -1
- package/test/css/javascript.css +1 -1
- package/test/css/legacy/legacy.css +1 -1
- package/test/css/math/parens-division/mixins-args.css +1 -1
- package/test/css/math/parens-division/parens.css +1 -1
- package/test/css/math/strict/mixins-args.css +1 -1
- package/test/css/math/strict/parens.css +1 -1
- package/test/css/math/strict-legacy/mixins-args.css +1 -1
- package/test/css/math/strict-legacy/parens.css +1 -1
- package/test/css/media.css +14 -14
- package/test/css/merge.css +10 -10
- package/test/css/mixins-guards.css +6 -6
- package/test/css/mixins.css +2 -2
- package/test/css/namespacing/namespacing-3.css +16 -1
- package/test/css/namespacing/namespacing-4.css +1 -1
- package/test/css/namespacing/namespacing-functions.css +6 -0
- package/test/css/no-strict-math/mixins-guards.css +1 -1
- package/test/css/permissive-parse.css +1 -1
- package/test/css/plugin.css +9 -9
- package/test/css/postProcessorPlugin/postProcessor.css +2 -2
- package/test/css/preProcessorPlugin/preProcessor.css +1 -1
- package/test/css/selectors.css +2 -2
- package/test/css/variables.css +1 -1
- package/test/css/visitorPlugin/visitor.css +1 -1
- package/test/index.js +6 -0
- package/test/less/calc.less +17 -1
- package/test/less/comments.less +1 -1
- package/test/less/css-3.less +5 -5
- package/test/less/css-guards.less +2 -2
- package/test/less/debug/import/test.less +2 -2
- package/test/less/debug/linenumbers.less +3 -3
- package/test/less/errors/color-func-invalid-color.less +1 -1
- package/test/less/errors/color-func-invalid-color.txt +1 -1
- package/test/less/errors/invalid-color-with-comment.less +1 -0
- package/test/less/errors/invalid-color-with-comment.txt +2 -0
- package/test/less/errors/plugin-1.txt +2 -2
- package/test/less/errors/plugin-2.txt +1 -2
- package/test/less/errors/plugin-3.txt +1 -2
- package/test/less/errors/property-ie5-hack.less +1 -1
- package/test/less/extend-chaining.less +3 -3
- package/test/less/extend-media.less +1 -1
- package/test/less/extend-nest.less +1 -1
- package/test/less/filemanagerPlugin/filemanager.less +1 -1
- package/test/less/functions-each.less +1 -1
- package/test/less/import/import-reference.less +1 -1
- package/test/less/import/import-test-f.less +1 -1
- package/test/less/import/json/index.json +11 -0
- package/test/less/import/json/index.less +1 -0
- package/test/less/import-reference-issues/global-scope-import.less +2 -2
- package/test/less/import-reference-issues/global-scope-nested.less +1 -1
- package/test/less/import-reference-issues.less +2 -2
- package/test/less/import-reference.less +1 -1
- package/test/less/javascript.less +1 -1
- package/test/less/legacy/legacy.less +1 -1
- package/test/less/math/parens-division/mixins-args.less +4 -4
- package/test/less/math/parens-division/parens.less +1 -1
- package/test/less/math/strict/mixins-args.less +4 -4
- package/test/less/math/strict/parens.less +1 -1
- package/test/less/math/strict-legacy/mixins-args.less +4 -4
- package/test/less/math/strict-legacy/parens.less +1 -1
- package/test/less/media.less +9 -9
- package/test/less/merge.less +10 -10
- package/test/less/mixins-guards.less +8 -8
- package/test/less/mixins-important.less +3 -3
- package/test/less/mixins.less +2 -2
- package/test/less/namespacing/namespacing-3.less +25 -2
- package/test/less/namespacing/namespacing-4.less +1 -1
- package/test/less/namespacing/namespacing-5.less +2 -2
- package/test/less/namespacing/namespacing-functions.less +26 -0
- package/test/less/no-strict-math/mixins-guards.less +2 -2
- package/test/less/permissive-parse.less +1 -1
- package/test/less/plugin.less +9 -9
- package/test/less/postProcessorPlugin/postProcessor.less +2 -2
- package/test/less/preProcessorPlugin/preProcessor.less +1 -1
- package/test/less/selectors.less +1 -1
- package/test/less/sourcemaps/imported.css +1 -1
- package/test/less/variables.less +1 -1
- package/test/less/visitorPlugin/visitor.less +1 -1
- package/test/less-test.js +45 -11
- package/test/less.js +11 -0
- package/test/sourcemaps/custom-props.json +1 -1
- package/.DS_Store +0 -0
- package/test/.DS_Store +0 -0
- package/test/browser/less.min.js +0 -11
- package/test/browser/less.min.js.map +0 -1
- package/test/browser/onload.js +0 -13
- package/test/browser/test-runner-template.tmpl +0 -105
- package/test/browser/vendor/boot.js +0 -148
- package/test/browser/vendor/jasmine-jsreporter.js +0 -391
- package/test/browser/vendor/promise.js +0 -2
- package/test/css/.DS_Store +0 -0
- package/test/css/math/.DS_Store +0 -0
- package/test/less/.DS_Store +0 -0
- package/test/less/math/.DS_Store +0 -0
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
color: black;
|
|
20
20
|
}
|
|
21
21
|
.i.j:extend(.g all) {
|
|
22
|
-
color:
|
|
22
|
+
color: inherit;
|
|
23
23
|
}
|
|
24
24
|
.k:extend(.i all) {}
|
|
25
25
|
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
}
|
|
66
66
|
.vb {
|
|
67
67
|
&:extend(.va);
|
|
68
|
-
color:
|
|
68
|
+
color: inherit;
|
|
69
69
|
}
|
|
70
70
|
.vc {
|
|
71
71
|
&:extend(.vb);
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
color: black;
|
|
79
79
|
}
|
|
80
80
|
.md {
|
|
81
|
-
color:
|
|
81
|
+
color: inherit;
|
|
82
82
|
}
|
|
83
83
|
@media plasma {
|
|
84
84
|
.me, .mf {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[
|
|
2
|
+
"{path}/import/import-test-a.less",
|
|
3
|
+
"{path}/import/import-test-b.less",
|
|
4
|
+
"{path}/import/deeper/url-import.less",
|
|
5
|
+
"{path}/import/urls.less",
|
|
6
|
+
"{path}/import/import-test-c.less",
|
|
7
|
+
"{path}/import/deeper/deeper-2/url-import.less",
|
|
8
|
+
"{path}/import/deeper/deeper-2/url-import-2.less",
|
|
9
|
+
"{path}/import/import-test-f.less",
|
|
10
|
+
"{path}/import/import-test-e.less"
|
|
11
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "../import-test-a";
|
|
@@ -32,8 +32,8 @@ show-all-content {
|
|
|
32
32
|
|
|
33
33
|
// #1851: Extend within (reference) imported files
|
|
34
34
|
// test-b is in global-scope-import.less file
|
|
35
|
-
.test-c {
|
|
36
|
-
&:extend(.test-b all);
|
|
35
|
+
.test-rule-c {
|
|
36
|
+
&:extend(.test-rule-b all);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
// #1968: When using an @import (reference), mixins that contain an & selector get added to the compiled output improperly
|
|
@@ -181,7 +181,7 @@ body {
|
|
|
181
181
|
defaults: 2px 2px 2px;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
.test-mixin-default-arg {
|
|
184
|
+
.test-rule-mixin-default-arg {
|
|
185
185
|
.mixin-default-arg();
|
|
186
186
|
.mixin-default-arg(2px);
|
|
187
187
|
}
|
|
@@ -205,14 +205,14 @@ body {
|
|
|
205
205
|
.mixin-comma-default3(4,2,2,2);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
.test-calling-one-arg-mixin(@a) {
|
|
208
|
+
.test-rule-calling-one-arg-mixin(@a) {
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
.test-calling-one-arg-mixin(@a, @b, @rest...) {
|
|
211
|
+
.test-rule-calling-one-arg-mixin(@a, @b, @rest...) {
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
div {
|
|
215
|
-
.test-calling-one-arg-mixin(1);
|
|
215
|
+
.test-rule-calling-one-arg-mixin(1);
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
mixins-args-expand-op- {
|
|
@@ -181,7 +181,7 @@ body {
|
|
|
181
181
|
defaults: 2px 2px 2px;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
.test-mixin-default-arg {
|
|
184
|
+
.test-rule-mixin-default-arg {
|
|
185
185
|
.mixin-default-arg();
|
|
186
186
|
.mixin-default-arg(2px);
|
|
187
187
|
}
|
|
@@ -205,14 +205,14 @@ body {
|
|
|
205
205
|
.mixin-comma-default3(4,2,2,2);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
.test-calling-one-arg-mixin(@a) {
|
|
208
|
+
.test-rule-calling-one-arg-mixin(@a) {
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
.test-calling-one-arg-mixin(@a, @b, @rest...) {
|
|
211
|
+
.test-rule-calling-one-arg-mixin(@a, @b, @rest...) {
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
div {
|
|
215
|
-
.test-calling-one-arg-mixin(1);
|
|
215
|
+
.test-rule-calling-one-arg-mixin(1);
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
mixins-args-expand-op- {
|
|
@@ -180,7 +180,7 @@ body {
|
|
|
180
180
|
defaults: 2px 2px 2px;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
.test-mixin-default-arg {
|
|
183
|
+
.test-rule-mixin-default-arg {
|
|
184
184
|
.mixin-default-arg();
|
|
185
185
|
.mixin-default-arg(2px);
|
|
186
186
|
}
|
|
@@ -204,14 +204,14 @@ body {
|
|
|
204
204
|
.mixin-comma-default3(4,2,2,2);
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
.test-calling-one-arg-mixin(@a) {
|
|
207
|
+
.test-rule-calling-one-arg-mixin(@a) {
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
.test-calling-one-arg-mixin(@a, @b, @rest...) {
|
|
210
|
+
.test-rule-calling-one-arg-mixin(@a, @b, @rest...) {
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
div {
|
|
214
|
-
.test-calling-one-arg-mixin(1);
|
|
214
|
+
.test-rule-calling-one-arg-mixin(1);
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
mixins-args-expand-op- {
|
package/test/less/media.less
CHANGED
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
|
|
18
18
|
@media screen {
|
|
19
19
|
@base: 8;
|
|
20
|
-
body { max-width: (@base * 60); }
|
|
20
|
+
.body { max-width: (@base * 60); }
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
@ratio_large: 16;
|
|
24
24
|
@ratio_small: 9;
|
|
25
25
|
|
|
26
26
|
@media all and (device-aspect-ratio: ~'@{ratio_large} / @{ratio_small}') {
|
|
27
|
-
body { max-width: 800px; }
|
|
27
|
+
.body { max-width: 800px; }
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
@media all and (orientation:portrait) {
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
@media handheld and (min-width: @var), screen and (min-width: 20em) {
|
|
35
|
-
body {
|
|
35
|
+
.body {
|
|
36
36
|
max-width: 480px;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
body {
|
|
40
|
+
.body {
|
|
41
41
|
@media print {
|
|
42
42
|
padding: 20px;
|
|
43
43
|
|
|
@@ -78,7 +78,7 @@ body {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
body {
|
|
81
|
+
.body {
|
|
82
82
|
@media a, b and c {
|
|
83
83
|
width: 95%;
|
|
84
84
|
|
|
@@ -109,7 +109,7 @@ body {
|
|
|
109
109
|
}
|
|
110
110
|
@smartphone: ~"only screen and (max-width: 200px)";
|
|
111
111
|
@media @smartphone {
|
|
112
|
-
body {
|
|
112
|
+
.body {
|
|
113
113
|
width: 480px;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -191,13 +191,13 @@ body {
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
body {
|
|
194
|
+
.body {
|
|
195
195
|
.bg();
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
@bpMedium: 1000px;
|
|
199
199
|
@media (max-width: @bpMedium) {
|
|
200
|
-
body {
|
|
200
|
+
.body {
|
|
201
201
|
.bg();
|
|
202
202
|
background: blue;
|
|
203
203
|
}
|
|
@@ -207,7 +207,7 @@ body {
|
|
|
207
207
|
/* a comment */
|
|
208
208
|
|
|
209
209
|
@media (max-width: 900px) {
|
|
210
|
-
body { font-size: 11px; }
|
|
210
|
+
.body { font-size: 11px; }
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
|
package/test/less/merge.less
CHANGED
|
@@ -20,40 +20,40 @@
|
|
|
20
20
|
background+: url(data://img2.png);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.
|
|
23
|
+
.test-rule1 {
|
|
24
24
|
// Can merge values
|
|
25
25
|
.first-transform();
|
|
26
26
|
.second-transform();
|
|
27
27
|
}
|
|
28
|
-
.
|
|
28
|
+
.test-rule2 {
|
|
29
29
|
// Won't merge values without +: merge directive, for backwards compatibility with css
|
|
30
30
|
.first-transform();
|
|
31
31
|
.third-transform();
|
|
32
32
|
}
|
|
33
|
-
.
|
|
33
|
+
.test-rule3 {
|
|
34
34
|
// Won't merge values from two sources with different properties
|
|
35
35
|
.fourth-transform();
|
|
36
36
|
.first-background();
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.test-rule4 {
|
|
39
39
|
.first-transform();
|
|
40
40
|
.fifth-transform();
|
|
41
41
|
}
|
|
42
|
-
.
|
|
42
|
+
.test-rule5 {
|
|
43
43
|
.first-transform();
|
|
44
44
|
.second-transform() !important;
|
|
45
45
|
}
|
|
46
|
-
.
|
|
46
|
+
.test-rule6 {
|
|
47
47
|
.second-transform();
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
.test-rule7 {
|
|
50
50
|
// inherit !important from merged subrules
|
|
51
51
|
.second-transform();
|
|
52
52
|
.second-transform() !important;
|
|
53
53
|
.second-transform();
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.test-interleaved {
|
|
56
|
+
.test-rule-interleaved {
|
|
57
57
|
transform+: t1;
|
|
58
58
|
background+: b1;
|
|
59
59
|
transform+: t2;
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
transform+: t3;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
.test-spaced {
|
|
64
|
+
.test-rule-spaced {
|
|
65
65
|
transform+_: t1;
|
|
66
66
|
background+_: b1;
|
|
67
67
|
transform+_: t2;
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
transform+_: t3;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
.test-interleaved-with-spaced {
|
|
72
|
+
.test-rule-interleaved-with-spaced {
|
|
73
73
|
transform+_: t1s;
|
|
74
74
|
transform+: t2;
|
|
75
75
|
background+: b1;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Stacking, functions..
|
|
3
3
|
|
|
4
4
|
.light (@a) when (lightness(@a) > 50%) {
|
|
5
|
-
color:
|
|
5
|
+
color: inherit;
|
|
6
6
|
}
|
|
7
7
|
.light (@a) when (lightness(@a) < 50%) {
|
|
8
8
|
color: black;
|
|
@@ -63,18 +63,18 @@
|
|
|
63
63
|
.default1 { .default }
|
|
64
64
|
|
|
65
65
|
// true & false keywords
|
|
66
|
-
.test (@a) when (@a) {
|
|
66
|
+
.test-rule (@a) when (@a) {
|
|
67
67
|
content: "true.";
|
|
68
68
|
}
|
|
69
|
-
.test (@a) when not (@a) {
|
|
69
|
+
.test-rule (@a) when not (@a) {
|
|
70
70
|
content: "false.";
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
.
|
|
74
|
-
.
|
|
75
|
-
.
|
|
76
|
-
.
|
|
77
|
-
.
|
|
73
|
+
.test-rule1 { .test-rule(true) }
|
|
74
|
+
.test-rule2 { .test-rule(false) }
|
|
75
|
+
.test-rule3 { .test-rule(1) }
|
|
76
|
+
.test-rule4 { .test-rule(boo) }
|
|
77
|
+
.test-rule5 { .test-rule("true") }
|
|
78
78
|
|
|
79
79
|
// Boolean expressions
|
|
80
80
|
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
.when-calling-nested-with-param-issue-2394 {
|
|
36
36
|
.size(10px) !important;
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.test-ruleMixin-2421 () {
|
|
39
39
|
.topCheck-2421 () {
|
|
40
40
|
.nestedCheck-2421() {
|
|
41
41
|
margin: 5px;
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
.topCheck-2421();
|
|
46
46
|
}
|
|
47
47
|
.class1-2421 {
|
|
48
|
-
.
|
|
48
|
+
.test-ruleMixin-2421() !important;
|
|
49
49
|
}
|
|
50
50
|
.class2-2421 {
|
|
51
|
-
.
|
|
51
|
+
.test-ruleMixin-2421();
|
|
52
52
|
}
|
|
53
53
|
|
package/test/less/mixins.less
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
#header {
|
|
30
30
|
.milk {
|
|
31
|
-
color:
|
|
31
|
+
color: inherit;
|
|
32
32
|
.mixin;
|
|
33
33
|
#theme > .mixin;
|
|
34
34
|
}
|
|
@@ -119,7 +119,7 @@ h3 { .margin_between(15px, 5px); }
|
|
|
119
119
|
.recursion() {
|
|
120
120
|
color: black;
|
|
121
121
|
}
|
|
122
|
-
.test-rec {
|
|
122
|
+
.test-rule-rec {
|
|
123
123
|
.recursion {
|
|
124
124
|
.recursion();
|
|
125
125
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@width: 400px;
|
|
3
3
|
@colors: {
|
|
4
4
|
toolbar-background: red;
|
|
5
|
-
toolbar-foreground:
|
|
5
|
+
toolbar-foreground: inherit;
|
|
6
6
|
}
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -25,4 +25,27 @@
|
|
|
25
25
|
background: @map[@colors][toolbar-background];
|
|
26
26
|
color: @map[@colors][toolbar-foreground];
|
|
27
27
|
}
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// !important after map usage
|
|
31
|
+
// https://github.com/less/less.js/issues/3430
|
|
32
|
+
@margins: {
|
|
33
|
+
zero: 0;
|
|
34
|
+
ten: 10px;
|
|
35
|
+
}
|
|
36
|
+
.cell {
|
|
37
|
+
margin: @margins[zero] @margins[ten]/2 !important;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.mixin(@color: black; @margin: 10px; @padding: 20px) {
|
|
41
|
+
color: @color;
|
|
42
|
+
margin: @margin;
|
|
43
|
+
padding: @padding;
|
|
44
|
+
width: @margins[zero] !important
|
|
45
|
+
}
|
|
46
|
+
.class1 {
|
|
47
|
+
.mixin(@margin: 20px; @color: #33acfe) !important;
|
|
48
|
+
}
|
|
49
|
+
.class2 {
|
|
50
|
+
.mixin(#efca44; @padding: 40px 10px);
|
|
51
|
+
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
primary: black;
|
|
9
9
|
secondary: grey;
|
|
10
10
|
}
|
|
11
|
-
.test() {
|
|
11
|
+
.test-rule() {
|
|
12
12
|
val: output;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
.my-navbar {
|
|
17
17
|
#theme.dark.navbar();
|
|
18
18
|
background: .colors[primary];
|
|
19
|
-
.test();
|
|
19
|
+
.test-rule();
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.another-navbar {
|
|
@@ -8,4 +8,30 @@
|
|
|
8
8
|
|
|
9
9
|
@return: {
|
|
10
10
|
single: val;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Issue #3405
|
|
14
|
+
#lookup {
|
|
15
|
+
@prop: test;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.mix (@var) {
|
|
19
|
+
width: @var;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.bar {
|
|
23
|
+
.mix(#lookup[@prop]);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Issue #3406
|
|
27
|
+
.mix2 (@n) {
|
|
28
|
+
value: @n;
|
|
29
|
+
}
|
|
30
|
+
#lookup2 {
|
|
31
|
+
@var: .mix2(lookup);
|
|
32
|
+
}
|
|
33
|
+
.example {
|
|
34
|
+
// #lookup[@var](); -- fails, need the following alias
|
|
35
|
+
@dr: #lookup2[@var];
|
|
36
|
+
@dr();
|
|
11
37
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// https://github.com/less/less.js/issues/2798
|
|
2
|
-
.test-2798 when ((8+4) < 13) {
|
|
2
|
+
.test-rule-2798 when ((8+4) < 13) {
|
|
3
3
|
regression: fixed;
|
|
4
4
|
}
|
|
5
|
-
.test-2798 when ((8+6) < 13) {
|
|
5
|
+
.test-rule-2798 when ((8+6) < 13) {
|
|
6
6
|
regression: should not be visible;
|
|
7
7
|
}
|
|
8
8
|
.conditions-parser-1 when (8+4 < 13) {
|
package/test/less/plugin.less
CHANGED
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
|
|
58
58
|
// `test-global` function should propagate into directive scope
|
|
59
59
|
@media screen {
|
|
60
|
-
.test {
|
|
60
|
+
.test-rule {
|
|
61
61
|
result : test-global();
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -68,13 +68,13 @@
|
|
|
68
68
|
// `test-global` function should propagate into nested directive scopes
|
|
69
69
|
@media screen and (min-width:100px) {
|
|
70
70
|
@media (max-width:400px) {
|
|
71
|
-
.test {
|
|
71
|
+
.test-rule {
|
|
72
72
|
result : test-global();
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.test {
|
|
77
|
+
.test-rule {
|
|
78
78
|
@media screen {
|
|
79
79
|
@plugin "./plugin/plugin-local";
|
|
80
80
|
result : test-local();
|
|
@@ -86,29 +86,29 @@
|
|
|
86
86
|
.root {
|
|
87
87
|
@ruleset2();
|
|
88
88
|
}
|
|
89
|
-
.test-empty {
|
|
89
|
+
.test-rule-empty {
|
|
90
90
|
val1: foo;
|
|
91
91
|
test-collapse();
|
|
92
92
|
val2: foo;
|
|
93
93
|
}
|
|
94
|
-
.test-simple {
|
|
94
|
+
.test-rule-simple {
|
|
95
95
|
@plugin "./plugin/plugin-simple";
|
|
96
96
|
value: pi-anon();
|
|
97
97
|
value: (pi() * 2);
|
|
98
98
|
}
|
|
99
|
-
.test-conflicts {
|
|
99
|
+
.test-rule-conflicts {
|
|
100
100
|
@plugin "./plugin/plugin-scope1";
|
|
101
101
|
value: foo();
|
|
102
102
|
}
|
|
103
|
-
.test-conflicts {
|
|
103
|
+
.test-rule-conflicts {
|
|
104
104
|
@plugin "./plugin/plugin-scope2";
|
|
105
105
|
value: foo();
|
|
106
106
|
}
|
|
107
|
-
.test-conflicts {
|
|
107
|
+
.test-rule-conflicts {
|
|
108
108
|
@plugin "./plugin/plugin-scope1";
|
|
109
109
|
value: foo();
|
|
110
110
|
}
|
|
111
|
-
.test-collection {
|
|
111
|
+
.test-rule-collection {
|
|
112
112
|
@plugin "./plugin/plugin-collection";
|
|
113
113
|
@var: 32;
|
|
114
114
|
store(@var);
|