less 2.3.1 → 2.4.0
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/.idea/workspace.xml +277 -237
- package/.jscsrc +36 -1
- package/.travis.yml +1 -0
- package/CHANGELOG.md +14 -0
- package/Gruntfile.js +1 -1
- package/appveyor.yml +5 -0
- package/bin/lessc +8 -5
- package/bower.json +1 -1
- package/dist/less.js +909 -814
- package/dist/less.min.js +6 -6
- package/lib/less/contexts.js +2 -2
- package/lib/less/environment/abstract-file-manager.js +6 -6
- package/lib/less/environment/environment.js +2 -2
- package/lib/less/functions/color.js +13 -5
- package/lib/less/functions/math.js +1 -1
- package/lib/less/functions/number.js +2 -2
- package/lib/less/functions/types.js +18 -8
- package/lib/less/import-manager.js +5 -5
- package/lib/less/index.js +1 -1
- package/lib/less/less-error.js +1 -1
- package/lib/less/logger.js +2 -2
- package/lib/less/parse-tree.js +45 -45
- package/lib/less/parse.js +5 -2
- package/lib/less/parser/parser-input.js +3 -3
- package/lib/less/parser/parser.js +52 -18
- package/lib/less/plugin-manager.js +30 -3
- package/lib/less/render.js +5 -2
- package/lib/less/source-map-builder.js +4 -0
- package/lib/less/source-map-output.js +3 -3
- package/lib/less/transform-tree.js +4 -4
- package/lib/less/tree/anonymous.js +1 -1
- package/lib/less/tree/call.js +1 -1
- package/lib/less/tree/color.js +2 -2
- package/lib/less/tree/condition.js +8 -4
- package/lib/less/tree/dimension.js +4 -4
- package/lib/less/tree/element.js +1 -1
- package/lib/less/tree/expression.js +1 -1
- package/lib/less/tree/extend.js +3 -3
- package/lib/less/tree/javascript.js +2 -2
- package/lib/less/tree/media.js +20 -20
- package/lib/less/tree/mixin-call.js +2 -2
- package/lib/less/tree/mixin-definition.js +29 -8
- package/lib/less/tree/quoted.js +3 -3
- package/lib/less/tree/rule.js +1 -1
- package/lib/less/tree/ruleset.js +35 -28
- package/lib/less/tree/selector.js +1 -1
- package/lib/less/tree/unit.js +2 -0
- package/lib/less/tree/value.js +1 -1
- package/lib/less/visitors/extend-visitor.js +15 -14
- package/lib/less/visitors/import-sequencer.js +2 -2
- package/lib/less/visitors/import-visitor.js +2 -2
- package/lib/less/visitors/to-css-visitor.js +5 -5
- package/lib/less-browser/cache.js +2 -2
- package/lib/less-browser/file-manager.js +96 -96
- package/lib/less-browser/index.js +205 -205
- package/lib/less-browser/log-listener.js +2 -2
- package/lib/less-browser/utils.js +6 -6
- package/lib/less-node/file-manager.js +9 -4
- package/lib/less-node/index.js +3 -3
- package/lib/less-node/plugin-loader.js +3 -3
- package/lib/less-node/url-file-manager.js +5 -2
- package/lib/less-rhino/index.js +13 -9
- package/lib/source-map/source-map-0.1.31.js +1 -1
- package/package.json +1 -1
- package/test/browser/css/relative-urls/urls.css +1 -0
- package/test/browser/less/relative-urls/urls.less +1 -0
- package/test/browser/runner-browser-options.js +23 -23
- package/test/browser/runner-errors-spec.js +1 -1
- package/test/browser/runner-global-vars-spec.js +1 -1
- package/test/browser/runner-main-options.js +5 -5
- package/test/browser/runner-main-spec.js +1 -1
- package/test/copy-bom.js +35 -35
- package/test/css/functions.css +8 -0
- package/test/css/import-interpolation.css +1 -0
- package/test/css/mixins-important.css +6 -0
- package/test/css/selectors.css +5 -0
- package/test/css/static-urls/urls.css +1 -0
- package/test/css/urls.css +1 -0
- package/test/index.js +2 -1
- package/test/less/functions.less +13 -0
- package/test/less/import/imports/logo.less +1 -0
- package/test/less/mixins-important.less +17 -1
- package/test/less/selectors.less +10 -0
- package/test/less/sourcemaps-empty/empty.less +0 -0
- package/test/less/sourcemaps-empty/var-defs.less +1 -0
- package/test/less/urls.less +1 -1
- package/test/less-test.js +49 -27
- package/test/modify-vars.js +13 -13
- package/test/browser/less.js +0 -29
- package/test/less-bom/charsets.less +0 -3
- package/test/less-bom/colors.less +0 -98
- package/test/less-bom/comments.less +0 -102
- package/test/less-bom/comments2.less +0 -20
- package/test/less-bom/compression/compression.less +0 -36
- package/test/less-bom/css-3.less +0 -154
- package/test/less-bom/css-escapes.less +0 -33
- package/test/less-bom/css-guards.less +0 -103
- package/test/less-bom/css.less +0 -108
- package/test/less-bom/debug/import/test.less +0 -25
- package/test/less-bom/debug/linenumbers.less +0 -33
- package/test/less-bom/detached-rulesets.less +0 -103
- package/test/less-bom/empty.less +0 -1
- package/test/less-bom/errors/add-mixed-units.less +0 -3
- package/test/less-bom/errors/add-mixed-units.txt +0 -4
- package/test/less-bom/errors/add-mixed-units2.less +0 -3
- package/test/less-bom/errors/add-mixed-units2.txt +0 -4
- package/test/less-bom/errors/at-rules-undefined-var.less +0 -4
- package/test/less-bom/errors/at-rules-undefined-var.txt +0 -4
- package/test/less-bom/errors/bad-variable-declaration1.less +0 -1
- package/test/less-bom/errors/bad-variable-declaration1.txt +0 -2
- package/test/less-bom/errors/color-func-invalid-color.less +0 -3
- package/test/less-bom/errors/color-func-invalid-color.txt +0 -4
- package/test/less-bom/errors/color-invalid-hex-code.less +0 -3
- package/test/less-bom/errors/color-invalid-hex-code.txt +0 -4
- package/test/less-bom/errors/color-invalid-hex-code2.less +0 -3
- package/test/less-bom/errors/color-invalid-hex-code2.txt +0 -4
- package/test/less-bom/errors/css-guard-default-func.less +0 -4
- package/test/less-bom/errors/css-guard-default-func.txt +0 -4
- package/test/less-bom/errors/detached-ruleset-1.less +0 -6
- package/test/less-bom/errors/detached-ruleset-1.txt +0 -4
- package/test/less-bom/errors/detached-ruleset-2.less +0 -6
- package/test/less-bom/errors/detached-ruleset-2.txt +0 -4
- package/test/less-bom/errors/detached-ruleset-3.less +0 -4
- package/test/less-bom/errors/detached-ruleset-3.txt +0 -4
- package/test/less-bom/errors/detached-ruleset-4.less +0 -5
- package/test/less-bom/errors/detached-ruleset-4.txt +0 -4
- package/test/less-bom/errors/detached-ruleset-5.less +0 -4
- package/test/less-bom/errors/detached-ruleset-5.txt +0 -3
- package/test/less-bom/errors/detached-ruleset-6.less +0 -5
- package/test/less-bom/errors/detached-ruleset-6.txt +0 -4
- package/test/less-bom/errors/divide-mixed-units.less +0 -3
- package/test/less-bom/errors/divide-mixed-units.txt +0 -4
- package/test/less-bom/errors/extend-no-selector.less +0 -3
- package/test/less-bom/errors/extend-no-selector.txt +0 -3
- package/test/less-bom/errors/extend-not-at-end.less +0 -3
- package/test/less-bom/errors/extend-not-at-end.txt +0 -3
- package/test/less-bom/errors/import-malformed.less +0 -1
- package/test/less-bom/errors/import-malformed.txt +0 -3
- package/test/less-bom/errors/import-missing.less +0 -6
- package/test/less-bom/errors/import-missing.txt +0 -3
- package/test/less-bom/errors/import-no-semi.less +0 -1
- package/test/less-bom/errors/import-no-semi.txt +0 -2
- package/test/less-bom/errors/import-subfolder1.less +0 -1
- package/test/less-bom/errors/import-subfolder1.txt +0 -3
- package/test/less-bom/errors/import-subfolder2.less +0 -1
- package/test/less-bom/errors/import-subfolder2.txt +0 -4
- package/test/less-bom/errors/imports/import-subfolder1.less +0 -1
- package/test/less-bom/errors/imports/import-subfolder2.less +0 -1
- package/test/less-bom/errors/imports/import-test.less +0 -4
- package/test/less-bom/errors/imports/subfolder/mixin-not-defined.less +0 -1
- package/test/less-bom/errors/imports/subfolder/parse-error-curly-bracket.less +0 -1
- package/test/less-bom/errors/javascript-error.less +0 -3
- package/test/less-bom/errors/javascript-error.txt +0 -4
- package/test/less-bom/errors/javascript-undefined-var.less +0 -3
- package/test/less-bom/errors/javascript-undefined-var.txt +0 -4
- package/test/less-bom/errors/mixed-mixin-definition-args-1.less +0 -6
- package/test/less-bom/errors/mixed-mixin-definition-args-1.txt +0 -4
- package/test/less-bom/errors/mixed-mixin-definition-args-2.less +0 -6
- package/test/less-bom/errors/mixed-mixin-definition-args-2.txt +0 -4
- package/test/less-bom/errors/mixin-not-defined.less +0 -11
- package/test/less-bom/errors/mixin-not-defined.txt +0 -3
- package/test/less-bom/errors/mixin-not-matched.less +0 -6
- package/test/less-bom/errors/mixin-not-matched.txt +0 -3
- package/test/less-bom/errors/mixin-not-matched2.less +0 -6
- package/test/less-bom/errors/mixin-not-matched2.txt +0 -3
- package/test/less-bom/errors/mixin-not-visible-in-scope-1.less +0 -9
- package/test/less-bom/errors/mixin-not-visible-in-scope-1.txt +0 -4
- package/test/less-bom/errors/mixins-guards-default-func-1.less +0 -9
- package/test/less-bom/errors/mixins-guards-default-func-1.txt +0 -4
- package/test/less-bom/errors/mixins-guards-default-func-2.less +0 -9
- package/test/less-bom/errors/mixins-guards-default-func-2.txt +0 -4
- package/test/less-bom/errors/mixins-guards-default-func-3.less +0 -9
- package/test/less-bom/errors/mixins-guards-default-func-3.txt +0 -4
- package/test/less-bom/errors/multiple-guards-on-css-selectors.less +0 -4
- package/test/less-bom/errors/multiple-guards-on-css-selectors.txt +0 -4
- package/test/less-bom/errors/multiple-guards-on-css-selectors2.less +0 -4
- package/test/less-bom/errors/multiple-guards-on-css-selectors2.txt +0 -4
- package/test/less-bom/errors/multiply-mixed-units.less +0 -7
- package/test/less-bom/errors/multiply-mixed-units.txt +0 -4
- package/test/less-bom/errors/parens-error-1.less +0 -3
- package/test/less-bom/errors/parens-error-1.txt +0 -4
- package/test/less-bom/errors/parens-error-2.less +0 -3
- package/test/less-bom/errors/parens-error-2.txt +0 -4
- package/test/less-bom/errors/parens-error-3.less +0 -3
- package/test/less-bom/errors/parens-error-3.txt +0 -4
- package/test/less-bom/errors/parse-error-curly-bracket.less +0 -4
- package/test/less-bom/errors/parse-error-curly-bracket.txt +0 -4
- package/test/less-bom/errors/parse-error-extra-parens.less +0 -5
- package/test/less-bom/errors/parse-error-extra-parens.txt +0 -3
- package/test/less-bom/errors/parse-error-missing-bracket.less +0 -2
- package/test/less-bom/errors/parse-error-missing-bracket.txt +0 -3
- package/test/less-bom/errors/parse-error-missing-parens.less +0 -5
- package/test/less-bom/errors/parse-error-missing-parens.txt +0 -3
- package/test/less-bom/errors/parse-error-with-import.less +0 -13
- package/test/less-bom/errors/parse-error-with-import.txt +0 -4
- package/test/less-bom/errors/percentage-missing-space.less +0 -3
- package/test/less-bom/errors/percentage-missing-space.txt +0 -4
- package/test/less-bom/errors/property-asterisk-only-name.less +0 -3
- package/test/less-bom/errors/property-asterisk-only-name.txt +0 -4
- package/test/less-bom/errors/property-ie5-hack.less +0 -3
- package/test/less-bom/errors/property-ie5-hack.txt +0 -3
- package/test/less-bom/errors/property-in-root.less +0 -4
- package/test/less-bom/errors/property-in-root.txt +0 -4
- package/test/less-bom/errors/property-in-root2.less +0 -1
- package/test/less-bom/errors/property-in-root2.txt +0 -4
- package/test/less-bom/errors/property-in-root3.less +0 -4
- package/test/less-bom/errors/property-in-root3.txt +0 -3
- package/test/less-bom/errors/property-interp-not-defined.less +0 -1
- package/test/less-bom/errors/property-interp-not-defined.txt +0 -2
- package/test/less-bom/errors/recursive-variable.less +0 -1
- package/test/less-bom/errors/recursive-variable.txt +0 -2
- package/test/less-bom/errors/single-character.less +0 -1
- package/test/less-bom/errors/single-character.txt +0 -2
- package/test/less-bom/errors/svg-gradient1.less +0 -3
- package/test/less-bom/errors/svg-gradient1.txt +0 -4
- package/test/less-bom/errors/svg-gradient2.less +0 -3
- package/test/less-bom/errors/svg-gradient2.txt +0 -4
- package/test/less-bom/errors/svg-gradient3.less +0 -3
- package/test/less-bom/errors/svg-gradient3.txt +0 -4
- package/test/less-bom/errors/unit-function.less +0 -3
- package/test/less-bom/errors/unit-function.txt +0 -4
- package/test/less-bom/extend-chaining.less +0 -91
- package/test/less-bom/extend-clearfix.less +0 -19
- package/test/less-bom/extend-exact.less +0 -46
- package/test/less-bom/extend-media.less +0 -24
- package/test/less-bom/extend-nest.less +0 -65
- package/test/less-bom/extend-selector.less +0 -99
- package/test/less-bom/extend.less +0 -81
- package/test/less-bom/extract-and-length.less +0 -133
- package/test/less-bom/functions.less +0 -201
- package/test/less-bom/globalVars/extended.json +0 -5
- package/test/less-bom/globalVars/extended.less +0 -10
- package/test/less-bom/globalVars/simple.json +0 -3
- package/test/less-bom/globalVars/simple.less +0 -3
- package/test/less-bom/ie-filters.less +0 -15
- package/test/less-bom/import/deeper/deeper-2/url-import-2.less +0 -3
- package/test/less-bom/import/deeper/deeper-2/url-import.less +0 -1
- package/test/less-bom/import/deeper/import-once-test-a.less +0 -1
- package/test/less-bom/import/deeper/url-import.less +0 -1
- package/test/less-bom/import/import-and-relative-paths-test.less +0 -17
- package/test/less-bom/import/import-charset-test.less +0 -1
- package/test/less-bom/import/import-interpolation.less +0 -2
- package/test/less-bom/import/import-interpolation2.less +0 -5
- package/test/less-bom/import/import-once-test-c.less +0 -6
- package/test/less-bom/import/import-reference.less +0 -89
- package/test/less-bom/import/import-test-a.less +0 -4
- package/test/less-bom/import/import-test-b.less +0 -8
- package/test/less-bom/import/import-test-c.less +0 -6
- package/test/less-bom/import/import-test-d.css +0 -1
- package/test/less-bom/import/import-test-e.less +0 -2
- package/test/less-bom/import/import-test-f.less +0 -5
- package/test/less-bom/import/imports/font.less +0 -8
- package/test/less-bom/import/imports/logo.less +0 -5
- package/test/less-bom/import/interpolation-vars.less +0 -6
- package/test/less-bom/import/invalid-css.less +0 -1
- package/test/less-bom/import/urls.less +0 -1
- package/test/less-bom/import-inline.less +0 -3
- package/test/less-bom/import-interpolation.less +0 -8
- package/test/less-bom/import-once.less +0 -6
- package/test/less-bom/import-reference.less +0 -23
- package/test/less-bom/import.less +0 -30
- package/test/less-bom/include-path/include-path.less +0 -6
- package/test/less-bom/javascript.less +0 -38
- package/test/less-bom/lazy-eval.less +0 -6
- package/test/less-bom/legacy/legacy.less +0 -7
- package/test/less-bom/media.less +0 -234
- package/test/less-bom/merge.less +0 -78
- package/test/less-bom/mixins-args.less +0 -215
- package/test/less-bom/mixins-closure.less +0 -26
- package/test/less-bom/mixins-guards-default-func.less +0 -195
- package/test/less-bom/mixins-guards.less +0 -271
- package/test/less-bom/mixins-important.less +0 -37
- package/test/less-bom/mixins-interpolated.less +0 -75
- package/test/less-bom/mixins-named-args.less +0 -36
- package/test/less-bom/mixins-nested.less +0 -22
- package/test/less-bom/mixins-pattern.less +0 -102
- package/test/less-bom/mixins.less +0 -145
- package/test/less-bom/modifyVars/extended.json +0 -5
- package/test/less-bom/modifyVars/extended.less +0 -11
- package/test/less-bom/nested-gradient-with-svg-gradient/mixin-consumer.less +0 -5
- package/test/less-bom/nested-gradient-with-svg-gradient/svg-gradient-mixin.less +0 -15
- package/test/less-bom/no-js-errors/no-js-errors.less +0 -3
- package/test/less-bom/no-js-errors/no-js-errors.txt +0 -4
- package/test/less-bom/no-output.less +0 -2
- package/test/less-bom/operations.less +0 -62
- package/test/less-bom/parens.less +0 -45
- package/test/less-bom/property-name-interp.less +0 -56
- package/test/less-bom/rulesets.less +0 -30
- package/test/less-bom/scope.less +0 -104
- package/test/less-bom/selectors.less +0 -174
- package/test/less-bom/sourcemaps/basic.json +0 -3
- package/test/less-bom/sourcemaps/basic.less +0 -27
- package/test/less-bom/sourcemaps/imported.css +0 -7
- package/test/less-bom/static-urls/urls.less +0 -33
- package/test/less-bom/strict-units/strict-units.less +0 -4
- package/test/less-bom/strings.less +0 -73
- package/test/less-bom/url-args/urls.less +0 -63
- package/test/less-bom/urls.less +0 -94
- package/test/less-bom/variables-in-at-rules.less +0 -20
- package/test/less-bom/variables.less +0 -119
- package/test/less-bom/whitespace.less +0 -44
package/test/less-bom/media.less
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// For now, variables can't be declared inside @media blocks.
|
|
3
|
-
|
|
4
|
-
@var: 42;
|
|
5
|
-
|
|
6
|
-
@media print {
|
|
7
|
-
.class {
|
|
8
|
-
color: blue;
|
|
9
|
-
.sub {
|
|
10
|
-
width: @var;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
.top, header > h1 {
|
|
14
|
-
color: (#222 * 2);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@media screen {
|
|
19
|
-
@base: 8;
|
|
20
|
-
body { max-width: (@base * 60); }
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@ratio_large: 16;
|
|
24
|
-
@ratio_small: 9;
|
|
25
|
-
|
|
26
|
-
@media all and (device-aspect-ratio: @ratio_large / @ratio_small) {
|
|
27
|
-
body { max-width: 800px; }
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@media all and (orientation:portrait) {
|
|
31
|
-
aside { float: none; }
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@media handheld and (min-width: @var), screen and (min-width: 20em) {
|
|
35
|
-
body {
|
|
36
|
-
max-width: 480px;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
body {
|
|
41
|
-
@media print {
|
|
42
|
-
padding: 20px;
|
|
43
|
-
|
|
44
|
-
header {
|
|
45
|
-
background-color: red;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@media (orientation:landscape) {
|
|
49
|
-
margin-left: 20px;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
@media screen {
|
|
55
|
-
.sidebar {
|
|
56
|
-
width: 300px;
|
|
57
|
-
@media (orientation: landscape) {
|
|
58
|
-
width: 500px;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
@media a {
|
|
64
|
-
.first {
|
|
65
|
-
@media b {
|
|
66
|
-
.second {
|
|
67
|
-
.third {
|
|
68
|
-
width: 300px;
|
|
69
|
-
@media c {
|
|
70
|
-
width: 500px;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
.fourth {
|
|
74
|
-
width: 3;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
body {
|
|
82
|
-
@media a, b and c {
|
|
83
|
-
width: 95%;
|
|
84
|
-
|
|
85
|
-
@media x, y {
|
|
86
|
-
width: 100%;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.mediaMixin(@fallback: 200px) {
|
|
92
|
-
background: black;
|
|
93
|
-
|
|
94
|
-
@media handheld {
|
|
95
|
-
background: white;
|
|
96
|
-
|
|
97
|
-
@media (max-width: @fallback) {
|
|
98
|
-
background: red;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.a {
|
|
104
|
-
.mediaMixin(100px);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.b {
|
|
108
|
-
.mediaMixin();
|
|
109
|
-
}
|
|
110
|
-
@smartphone: ~"only screen and (max-width: 200px)";
|
|
111
|
-
@media @smartphone {
|
|
112
|
-
body {
|
|
113
|
-
width: 480px;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
@media print {
|
|
118
|
-
@page :left {
|
|
119
|
-
margin: 0.5cm;
|
|
120
|
-
}
|
|
121
|
-
@page :right {
|
|
122
|
-
margin: 0.5cm;
|
|
123
|
-
}
|
|
124
|
-
@page Test:first {
|
|
125
|
-
margin: 1cm;
|
|
126
|
-
}
|
|
127
|
-
@page :first {
|
|
128
|
-
size: 8.5in 11in;
|
|
129
|
-
@top-left {
|
|
130
|
-
margin: 1cm;
|
|
131
|
-
}
|
|
132
|
-
@top-left-corner {
|
|
133
|
-
margin: 1cm;
|
|
134
|
-
}
|
|
135
|
-
@top-center {
|
|
136
|
-
margin: 1cm;
|
|
137
|
-
}
|
|
138
|
-
@top-right {
|
|
139
|
-
margin: 1cm;
|
|
140
|
-
}
|
|
141
|
-
@top-right-corner {
|
|
142
|
-
margin: 1cm;
|
|
143
|
-
}
|
|
144
|
-
@bottom-left {
|
|
145
|
-
margin: 1cm;
|
|
146
|
-
}
|
|
147
|
-
@bottom-left-corner {
|
|
148
|
-
margin: 1cm;
|
|
149
|
-
}
|
|
150
|
-
@bottom-center {
|
|
151
|
-
margin: 1cm;
|
|
152
|
-
}
|
|
153
|
-
@bottom-right {
|
|
154
|
-
margin: 1cm;
|
|
155
|
-
}
|
|
156
|
-
@bottom-right-corner {
|
|
157
|
-
margin: 1cm;
|
|
158
|
-
}
|
|
159
|
-
@left-top {
|
|
160
|
-
margin: 1cm;
|
|
161
|
-
}
|
|
162
|
-
@left-middle {
|
|
163
|
-
margin: 1cm;
|
|
164
|
-
}
|
|
165
|
-
@left-bottom {
|
|
166
|
-
margin: 1cm;
|
|
167
|
-
}
|
|
168
|
-
@right-top {
|
|
169
|
-
margin: 1cm;
|
|
170
|
-
}
|
|
171
|
-
@right-middle {
|
|
172
|
-
content: "Page " counter(page);
|
|
173
|
-
}
|
|
174
|
-
@right-bottom {
|
|
175
|
-
margin: 1cm;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
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) {
|
|
181
|
-
.b {
|
|
182
|
-
background: red;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.bg() {
|
|
187
|
-
background: red;
|
|
188
|
-
|
|
189
|
-
@media (max-width: 500px) {
|
|
190
|
-
background: green;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
body {
|
|
195
|
-
.bg();
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
@bpMedium: 1000px;
|
|
199
|
-
@media (max-width: @bpMedium) {
|
|
200
|
-
body {
|
|
201
|
-
.bg();
|
|
202
|
-
background: blue;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
@media (max-width: 1200px) {
|
|
207
|
-
/* a comment */
|
|
208
|
-
|
|
209
|
-
@media (max-width: 900px) {
|
|
210
|
-
body { font-size: 11px; }
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.nav-justified {
|
|
215
|
-
@media (min-width: 480px) {
|
|
216
|
-
> li {
|
|
217
|
-
display: table-cell;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.menu
|
|
223
|
-
{
|
|
224
|
-
@media (min-width: 768px) {
|
|
225
|
-
.nav-justified();
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
@all: ~"all";
|
|
229
|
-
@tv: ~"tv";
|
|
230
|
-
@media @all and @tv {
|
|
231
|
-
.all-and-tv-variables {
|
|
232
|
-
var: all-and-tv;
|
|
233
|
-
}
|
|
234
|
-
}
|
package/test/less-bom/merge.less
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
.first-transform() {
|
|
2
|
-
transform+: rotate(90deg), skew(30deg);
|
|
3
|
-
}
|
|
4
|
-
.second-transform() {
|
|
5
|
-
transform+: scale(2,4);
|
|
6
|
-
}
|
|
7
|
-
.third-transform() {
|
|
8
|
-
transform: scaleX(45deg);
|
|
9
|
-
}
|
|
10
|
-
.fourth-transform() {
|
|
11
|
-
transform+: scaleX(45deg);
|
|
12
|
-
}
|
|
13
|
-
.fifth-transform() {
|
|
14
|
-
transform+: scale(2,4) !important;
|
|
15
|
-
}
|
|
16
|
-
.first-background() {
|
|
17
|
-
background+: url(data://img1.png);
|
|
18
|
-
}
|
|
19
|
-
.second-background() {
|
|
20
|
-
background+: url(data://img2.png);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.test1 {
|
|
24
|
-
// Can merge values
|
|
25
|
-
.first-transform();
|
|
26
|
-
.second-transform();
|
|
27
|
-
}
|
|
28
|
-
.test2 {
|
|
29
|
-
// Wont merge values without +: merge directive, for backwards compatibility with css
|
|
30
|
-
.first-transform();
|
|
31
|
-
.third-transform();
|
|
32
|
-
}
|
|
33
|
-
.test3 {
|
|
34
|
-
// Wont merge values from two sources with different properties
|
|
35
|
-
.fourth-transform();
|
|
36
|
-
.first-background();
|
|
37
|
-
}
|
|
38
|
-
.test4 {
|
|
39
|
-
// Wont merge values from sources that merked as !important, for backwards compatibility with css
|
|
40
|
-
.first-transform();
|
|
41
|
-
.fifth-transform();
|
|
42
|
-
}
|
|
43
|
-
.test5 {
|
|
44
|
-
// Wont merge values from mixins that merked as !important, for backwards compatibility with css
|
|
45
|
-
.first-transform();
|
|
46
|
-
.second-transform() !important;
|
|
47
|
-
}
|
|
48
|
-
.test6 {
|
|
49
|
-
// Ignores !merge if no peers found
|
|
50
|
-
.second-transform();
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.test-interleaved {
|
|
54
|
-
transform+: t1;
|
|
55
|
-
background+: b1;
|
|
56
|
-
transform+: t2;
|
|
57
|
-
background+: b2, b3;
|
|
58
|
-
transform+: t3;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.test-spaced {
|
|
62
|
-
transform+_: t1;
|
|
63
|
-
background+_: b1;
|
|
64
|
-
transform+_: t2;
|
|
65
|
-
background+_: b2, b3;
|
|
66
|
-
transform+_: t3;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.test-interleaved-with-spaced {
|
|
70
|
-
transform+_: t1s;
|
|
71
|
-
transform+: t2;
|
|
72
|
-
background+: b1;
|
|
73
|
-
transform+_: t3s;
|
|
74
|
-
transform+: t4 t5s;
|
|
75
|
-
background+_: b2s, b3;
|
|
76
|
-
transform+_: t6s;
|
|
77
|
-
background+: b4;
|
|
78
|
-
}
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
.mixin (@a: 1px, @b: 50%) {
|
|
2
|
-
width: (@a * 5);
|
|
3
|
-
height: (@b - 1%);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.mixina (@style, @width, @color: black) {
|
|
7
|
-
border: @width @style @color;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.mixiny
|
|
11
|
-
(@a: 0, @b: 0) {
|
|
12
|
-
margin: @a;
|
|
13
|
-
padding: @b;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.hidden() {
|
|
17
|
-
color: transparent; // asd
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
#hidden {
|
|
21
|
-
.hidden;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
#hidden1 {
|
|
25
|
-
.hidden();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.two-args {
|
|
29
|
-
color: blue;
|
|
30
|
-
.mixin(2px, 100%);
|
|
31
|
-
.mixina(dotted, 2px);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.one-arg {
|
|
35
|
-
.mixin(3px);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.no-parens {
|
|
39
|
-
.mixin;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.no-args {
|
|
43
|
-
.mixin();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.var-args {
|
|
47
|
-
@var: 9;
|
|
48
|
-
.mixin(@var, (@var * 2));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.multi-mix {
|
|
52
|
-
.mixin(2px, 30%);
|
|
53
|
-
.mixiny(4, 5);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.maxa(@arg1: 10, @arg2: #f00) {
|
|
57
|
-
padding: (@arg1 * 2px);
|
|
58
|
-
color: @arg2;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
body {
|
|
62
|
-
.maxa(15);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@glob: 5;
|
|
66
|
-
.global-mixin(@a:2) {
|
|
67
|
-
width: (@glob + @a);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.scope-mix {
|
|
71
|
-
.global-mixin(3);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.nested-ruleset (@width: 200px) {
|
|
75
|
-
width: @width;
|
|
76
|
-
.column { margin: @width; }
|
|
77
|
-
}
|
|
78
|
-
.content {
|
|
79
|
-
.nested-ruleset(600px);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
//
|
|
83
|
-
|
|
84
|
-
.same-var-name2(@radius) {
|
|
85
|
-
radius: @radius;
|
|
86
|
-
}
|
|
87
|
-
.same-var-name(@radius) {
|
|
88
|
-
.same-var-name2(@radius);
|
|
89
|
-
}
|
|
90
|
-
#same-var-name {
|
|
91
|
-
.same-var-name(5px);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
//
|
|
95
|
-
|
|
96
|
-
.var-inside () {
|
|
97
|
-
@var: 10px;
|
|
98
|
-
width: @var;
|
|
99
|
-
}
|
|
100
|
-
#var-inside { .var-inside; }
|
|
101
|
-
|
|
102
|
-
.mixin-arguments (@width: 0px, ...) {
|
|
103
|
-
border: @arguments;
|
|
104
|
-
width: @width;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.arguments {
|
|
108
|
-
.mixin-arguments(1px, solid, black);
|
|
109
|
-
}
|
|
110
|
-
.arguments2 {
|
|
111
|
-
.mixin-arguments();
|
|
112
|
-
}
|
|
113
|
-
.arguments3 {
|
|
114
|
-
.mixin-arguments;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.mixin-arguments2 (@width, @rest...) {
|
|
118
|
-
border: @arguments;
|
|
119
|
-
rest: @rest;
|
|
120
|
-
width: @width;
|
|
121
|
-
}
|
|
122
|
-
.arguments4 {
|
|
123
|
-
.mixin-arguments2(0, 1, 2, 3, 4);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// Edge cases
|
|
127
|
-
|
|
128
|
-
.edge-case {
|
|
129
|
-
.mixin-arguments("{");
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// Division vs. Literal Slash
|
|
133
|
-
.border-radius(@r: 2px/5px) {
|
|
134
|
-
border-radius: @r;
|
|
135
|
-
}
|
|
136
|
-
.slash-vs-math {
|
|
137
|
-
.border-radius();
|
|
138
|
-
.border-radius(5px/10px);
|
|
139
|
-
.border-radius((3px * 2));
|
|
140
|
-
}
|
|
141
|
-
// semi-colon vs comma for delimiting
|
|
142
|
-
|
|
143
|
-
.mixin-takes-one(@a) {
|
|
144
|
-
one: @a;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.mixin-takes-two(@a; @b) {
|
|
148
|
-
one: @a;
|
|
149
|
-
two: @b;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.comma-vs-semi-colon {
|
|
153
|
-
.mixin-takes-two(@a : a; @b : b, c);
|
|
154
|
-
.mixin-takes-two(@a : d, e; @b : f);
|
|
155
|
-
.mixin-takes-one(@a: g);
|
|
156
|
-
.mixin-takes-one(@a : h;);
|
|
157
|
-
.mixin-takes-one(i);
|
|
158
|
-
.mixin-takes-one(j;);
|
|
159
|
-
.mixin-takes-two(k, l);
|
|
160
|
-
.mixin-takes-one(m, n;);
|
|
161
|
-
.mixin-takes-two(o, p; q);
|
|
162
|
-
.mixin-takes-two(r, s; t;);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.mixin-conflict(@a:defA, @b:defB, @c:defC) {
|
|
166
|
-
three: @a, @b, @c;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.mixin-conflict(@a:defA, @b:defB, @c:defC, @d:defD) {
|
|
170
|
-
four: @a, @b, @c, @d;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
#named-conflict {
|
|
174
|
-
.mixin-conflict(11, 12, 13, @a:a);
|
|
175
|
-
.mixin-conflict(@a:a, 21, 22, 23);
|
|
176
|
-
}
|
|
177
|
-
@a: 3px;
|
|
178
|
-
.mixin-default-arg(@a: 1px, @b: @a, @c: @b) {
|
|
179
|
-
defaults: 1px 1px 1px;
|
|
180
|
-
defaults: 2px 2px 2px;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.test-mixin-default-arg {
|
|
184
|
-
.mixin-default-arg();
|
|
185
|
-
.mixin-default-arg(2px);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.mixin-comma-default1(@color; @padding; @margin: 2, 2, 2, 2) {
|
|
189
|
-
margin: @margin;
|
|
190
|
-
}
|
|
191
|
-
.selector {
|
|
192
|
-
.mixin-comma-default1(#33acfe; 4);
|
|
193
|
-
}
|
|
194
|
-
.mixin-comma-default2(@margin: 2, 2, 2, 2;) {
|
|
195
|
-
margin: @margin;
|
|
196
|
-
}
|
|
197
|
-
.selector2 {
|
|
198
|
-
.mixin-comma-default2();
|
|
199
|
-
}
|
|
200
|
-
.mixin-comma-default3(@margin: 2, 2, 2, 2) {
|
|
201
|
-
margin: @margin;
|
|
202
|
-
}
|
|
203
|
-
.selector3 {
|
|
204
|
-
.mixin-comma-default3(4,2,2,2);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.test-calling-one-arg-mixin(@a) {
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.test-calling-one-arg-mixin(@a, @b, @rest...) {
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
div {
|
|
214
|
-
.test-calling-one-arg-mixin(1);
|
|
215
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
.scope {
|
|
2
|
-
@var: 99px;
|
|
3
|
-
.mixin () {
|
|
4
|
-
width: @var;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.class {
|
|
9
|
-
.scope > .mixin;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.overwrite {
|
|
13
|
-
@var: 0px;
|
|
14
|
-
.scope > .mixin;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.nested {
|
|
18
|
-
@var: 5px;
|
|
19
|
-
.mixin () {
|
|
20
|
-
width: @var;
|
|
21
|
-
}
|
|
22
|
-
.class {
|
|
23
|
-
@var: 10px;
|
|
24
|
-
.mixin;
|
|
25
|
-
}
|
|
26
|
-
}
|