less 2.1.1 → 2.3.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/.idea/inspectionProfiles/Project_Default.xml +1 -0
- package/.idea/jsLinters/jscs.xml +4 -0
- package/.idea/jsLinters/jshint.xml +58 -4
- package/.idea/workspace.xml +451 -758
- package/.jscsrc +38 -0
- package/.jshintrc +0 -2
- package/.travis.yml +0 -1
- package/CHANGELOG.md +52 -0
- package/Gruntfile.js +37 -3
- package/bin/lessc +380 -316
- package/bower.json +1 -1
- package/dist/less.js +790 -479
- package/dist/less.min.js +7 -7
- package/lib/less/contexts.js +1 -1
- package/lib/less/data/unit-conversions.js +3 -3
- package/lib/less/environment/abstract-file-manager.js +4 -4
- package/lib/less/environment/environment.js +9 -0
- package/lib/less/functions/color-blending.js +3 -3
- package/lib/less/functions/color.js +8 -8
- package/lib/less/functions/data-uri.js +39 -31
- package/lib/less/functions/string.js +3 -1
- package/lib/less/functions/svg.js +12 -15
- package/lib/less/functions/types.js +15 -2
- package/lib/less/import-manager.js +10 -5
- package/lib/less/index.js +2 -1
- package/lib/less/parse-tree.js +8 -2
- package/lib/less/parse.js +65 -0
- package/lib/less/parser/parser-input.js +3 -2
- package/lib/less/parser/parser.js +24 -11
- package/lib/less/render.js +7 -36
- package/lib/less/source-map-output.js +3 -3
- package/lib/less/transform-tree.js +1 -1
- package/lib/less/tree/assignment.js +0 -1
- package/lib/less/tree/color.js +4 -4
- package/lib/less/tree/condition.js +1 -1
- package/lib/less/tree/debug-info.js +6 -2
- package/lib/less/tree/dimension.js +1 -1
- package/lib/less/tree/directive.js +25 -6
- package/lib/less/tree/expression.js +1 -1
- package/lib/less/tree/import.js +2 -2
- package/lib/less/tree/index.js +1 -0
- package/lib/less/tree/media.js +3 -2
- package/lib/less/tree/mixin-call.js +3 -4
- package/lib/less/tree/mixin-definition.js +4 -3
- package/lib/less/tree/quoted.js +1 -1
- package/lib/less/tree/rule.js +2 -3
- package/lib/less/tree/ruleset.js +263 -157
- package/lib/less/tree/selector.js +2 -1
- package/lib/less/tree/url.js +5 -2
- package/lib/less/tree/value.js +1 -1
- package/lib/less/tree/variable.js +1 -1
- package/lib/less/visitors/extend-visitor.js +60 -25
- package/lib/less/visitors/import-sequencer.js +20 -14
- package/lib/less/visitors/import-visitor.js +13 -10
- package/lib/less/visitors/to-css-visitor.js +37 -5
- package/lib/less-browser/add-default-options.js +5 -1
- package/lib/less-browser/bootstrap.js +10 -8
- package/lib/less-browser/cache.js +1 -1
- package/lib/less-browser/index.js +13 -12
- package/lib/less-browser/utils.js +9 -6
- package/lib/less-node/file-manager.js +51 -28
- package/lib/less-node/image-size.js +34 -0
- package/lib/less-node/index.js +3 -0
- package/lib/less-node/lessc-helper.js +3 -2
- package/lib/less-node/url-file-manager.js +2 -2
- package/lib/less-rhino/index.js +2 -4
- package/package.json +10 -7
- package/test/browser/common.js +13 -11
- package/test/browser/css/urls.css +6 -3
- package/test/browser/jasmine-jsreporter.js +2 -3
- package/test/browser/less/nested-gradient-with-svg-gradient/mixin-consumer.less +5 -0
- package/test/browser/less/nested-gradient-with-svg-gradient/svg-gradient-mixin.less +15 -0
- package/test/browser/less/urls.less +1 -0
- package/test/browser/less.js +15 -9424
- package/test/browser/runner-errors-options.js +0 -1
- package/test/browser/runner-errors-spec.js +0 -1
- package/test/browser/runner-legacy-options.js +0 -1
- package/test/browser/runner-no-js-errors-spec.js +0 -1
- package/test/browser/runner-production-options.js +0 -1
- package/test/browser/runner-relative-urls-options.js +0 -1
- package/test/browser/runner-rootpath-options.js +0 -1
- package/test/browser/runner-rootpath-relative-options.js +0 -1
- package/test/browser/runner-strict-units-options.js +0 -1
- package/test/copy-bom.js +72 -0
- package/test/css/comments.css +1 -0
- package/test/css/css-3.css +2 -0
- package/test/css/functions.css +2 -0
- package/test/css/import-interpolation.css +6 -0
- package/test/css/import-reference.css +25 -0
- package/test/css/include-path/include-path.css +6 -0
- package/test/css/mixins-important.css +6 -0
- package/test/css/selectors.css +10 -1
- package/test/css/url-args/urls.css +3 -3
- package/test/css/urls.css +12 -4
- package/test/css/variables.css +7 -1
- package/test/data/image.svg +3 -0
- package/test/index.js +14 -10
- package/test/less/comments.less +1 -0
- package/test/less/css-3.less +3 -0
- package/test/less/css-guards.less +2 -1
- package/test/less/errors/detached-ruleset-2.txt +1 -1
- package/test/less/errors/import-missing.txt +1 -1
- package/test/less/errors/parens-error-1.txt +1 -1
- package/test/less/errors/parens-error-2.txt +1 -1
- package/test/less/errors/parens-error-3.txt +1 -1
- package/test/less/errors/single-character.less +1 -0
- package/test/less/errors/single-character.txt +2 -0
- package/test/less/functions.less +5 -0
- package/test/less/import/import-interpolation.less +1 -0
- package/test/less/import/import-reference.less +38 -0
- package/test/less/import-reference.less +3 -1
- package/test/less/import.less +2 -0
- package/test/less/include-path/include-path.less +6 -0
- package/test/less/mixins-important.less +12 -0
- package/test/less/nested-gradient-with-svg-gradient/mixin-consumer.less +5 -0
- package/test/less/nested-gradient-with-svg-gradient/svg-gradient-mixin.less +15 -0
- package/test/less/selectors.less +19 -4
- package/test/less/urls.less +10 -1
- package/test/less/variables.less +17 -3
- package/test/less-bom/charsets.less +3 -0
- package/test/less-bom/colors.less +98 -0
- package/test/less-bom/comments.less +102 -0
- package/test/less-bom/comments2.less +20 -0
- package/test/less-bom/compression/compression.less +36 -0
- package/test/less-bom/css-3.less +154 -0
- package/test/less-bom/css-escapes.less +33 -0
- package/test/less-bom/css-guards.less +103 -0
- package/test/less-bom/css.less +108 -0
- package/test/less-bom/debug/import/test.less +25 -0
- package/test/less-bom/debug/linenumbers.less +33 -0
- package/test/less-bom/detached-rulesets.less +103 -0
- package/test/less-bom/empty.less +1 -0
- package/test/less-bom/errors/add-mixed-units.less +3 -0
- package/test/less-bom/errors/add-mixed-units.txt +4 -0
- package/test/less-bom/errors/add-mixed-units2.less +3 -0
- package/test/less-bom/errors/add-mixed-units2.txt +4 -0
- package/test/less-bom/errors/at-rules-undefined-var.less +4 -0
- package/test/less-bom/errors/at-rules-undefined-var.txt +4 -0
- package/test/less-bom/errors/bad-variable-declaration1.less +1 -0
- package/test/less-bom/errors/bad-variable-declaration1.txt +2 -0
- package/test/less-bom/errors/color-func-invalid-color.less +3 -0
- package/test/less-bom/errors/color-func-invalid-color.txt +4 -0
- package/test/less-bom/errors/color-invalid-hex-code.less +3 -0
- package/test/less-bom/errors/color-invalid-hex-code.txt +4 -0
- package/test/less-bom/errors/color-invalid-hex-code2.less +3 -0
- package/test/less-bom/errors/color-invalid-hex-code2.txt +4 -0
- package/test/less-bom/errors/css-guard-default-func.less +4 -0
- package/test/less-bom/errors/css-guard-default-func.txt +4 -0
- package/test/less-bom/errors/detached-ruleset-1.less +6 -0
- package/test/less-bom/errors/detached-ruleset-1.txt +4 -0
- package/test/less-bom/errors/detached-ruleset-2.less +6 -0
- package/test/less-bom/errors/detached-ruleset-2.txt +4 -0
- package/test/less-bom/errors/detached-ruleset-3.less +4 -0
- package/test/less-bom/errors/detached-ruleset-3.txt +4 -0
- package/test/less-bom/errors/detached-ruleset-4.less +5 -0
- package/test/less-bom/errors/detached-ruleset-4.txt +4 -0
- package/test/less-bom/errors/detached-ruleset-5.less +4 -0
- package/test/less-bom/errors/detached-ruleset-5.txt +3 -0
- package/test/less-bom/errors/detached-ruleset-6.less +5 -0
- package/test/less-bom/errors/detached-ruleset-6.txt +4 -0
- package/test/less-bom/errors/divide-mixed-units.less +3 -0
- package/test/less-bom/errors/divide-mixed-units.txt +4 -0
- package/test/less-bom/errors/extend-no-selector.less +3 -0
- package/test/less-bom/errors/extend-no-selector.txt +3 -0
- package/test/less-bom/errors/extend-not-at-end.less +3 -0
- package/test/less-bom/errors/extend-not-at-end.txt +3 -0
- package/test/less-bom/errors/import-malformed.less +1 -0
- package/test/less-bom/errors/import-malformed.txt +3 -0
- package/test/less-bom/errors/import-missing.less +6 -0
- package/test/less-bom/errors/import-missing.txt +3 -0
- package/test/less-bom/errors/import-no-semi.less +1 -0
- package/test/less-bom/errors/import-no-semi.txt +2 -0
- package/test/less-bom/errors/import-subfolder1.less +1 -0
- package/test/less-bom/errors/import-subfolder1.txt +3 -0
- package/test/less-bom/errors/import-subfolder2.less +1 -0
- package/test/less-bom/errors/import-subfolder2.txt +4 -0
- package/test/less-bom/errors/imports/import-subfolder1.less +1 -0
- package/test/less-bom/errors/imports/import-subfolder2.less +1 -0
- package/test/less-bom/errors/imports/import-test.less +4 -0
- package/test/less-bom/errors/imports/subfolder/mixin-not-defined.less +1 -0
- package/test/less-bom/errors/imports/subfolder/parse-error-curly-bracket.less +1 -0
- package/test/less-bom/errors/javascript-error.less +3 -0
- package/test/less-bom/errors/javascript-error.txt +4 -0
- package/test/less-bom/errors/javascript-undefined-var.less +3 -0
- package/test/less-bom/errors/javascript-undefined-var.txt +4 -0
- package/test/less-bom/errors/mixed-mixin-definition-args-1.less +6 -0
- package/test/less-bom/errors/mixed-mixin-definition-args-1.txt +4 -0
- package/test/less-bom/errors/mixed-mixin-definition-args-2.less +6 -0
- package/test/less-bom/errors/mixed-mixin-definition-args-2.txt +4 -0
- package/test/less-bom/errors/mixin-not-defined.less +11 -0
- package/test/less-bom/errors/mixin-not-defined.txt +3 -0
- package/test/less-bom/errors/mixin-not-matched.less +6 -0
- package/test/less-bom/errors/mixin-not-matched.txt +3 -0
- package/test/less-bom/errors/mixin-not-matched2.less +6 -0
- package/test/less-bom/errors/mixin-not-matched2.txt +3 -0
- package/test/less-bom/errors/mixin-not-visible-in-scope-1.less +9 -0
- package/test/less-bom/errors/mixin-not-visible-in-scope-1.txt +4 -0
- package/test/less-bom/errors/mixins-guards-default-func-1.less +9 -0
- package/test/less-bom/errors/mixins-guards-default-func-1.txt +4 -0
- package/test/less-bom/errors/mixins-guards-default-func-2.less +9 -0
- package/test/less-bom/errors/mixins-guards-default-func-2.txt +4 -0
- package/test/less-bom/errors/mixins-guards-default-func-3.less +9 -0
- package/test/less-bom/errors/mixins-guards-default-func-3.txt +4 -0
- package/test/less-bom/errors/multiple-guards-on-css-selectors.less +4 -0
- package/test/less-bom/errors/multiple-guards-on-css-selectors.txt +4 -0
- package/test/less-bom/errors/multiple-guards-on-css-selectors2.less +4 -0
- package/test/less-bom/errors/multiple-guards-on-css-selectors2.txt +4 -0
- package/test/less-bom/errors/multiply-mixed-units.less +7 -0
- package/test/less-bom/errors/multiply-mixed-units.txt +4 -0
- package/test/less-bom/errors/parens-error-1.less +3 -0
- package/test/less-bom/errors/parens-error-1.txt +4 -0
- package/test/less-bom/errors/parens-error-2.less +3 -0
- package/test/less-bom/errors/parens-error-2.txt +4 -0
- package/test/less-bom/errors/parens-error-3.less +3 -0
- package/test/less-bom/errors/parens-error-3.txt +4 -0
- package/test/less-bom/errors/parse-error-curly-bracket.less +4 -0
- package/test/less-bom/errors/parse-error-curly-bracket.txt +4 -0
- package/test/less-bom/errors/parse-error-extra-parens.less +5 -0
- package/test/less-bom/errors/parse-error-extra-parens.txt +3 -0
- package/test/less-bom/errors/parse-error-missing-bracket.less +2 -0
- package/test/less-bom/errors/parse-error-missing-bracket.txt +3 -0
- package/test/less-bom/errors/parse-error-missing-parens.less +5 -0
- package/test/less-bom/errors/parse-error-missing-parens.txt +3 -0
- package/test/less-bom/errors/parse-error-with-import.less +13 -0
- package/test/less-bom/errors/parse-error-with-import.txt +4 -0
- package/test/less-bom/errors/percentage-missing-space.less +3 -0
- package/test/less-bom/errors/percentage-missing-space.txt +4 -0
- package/test/less-bom/errors/property-asterisk-only-name.less +3 -0
- package/test/less-bom/errors/property-asterisk-only-name.txt +4 -0
- package/test/less-bom/errors/property-ie5-hack.less +3 -0
- package/test/less-bom/errors/property-ie5-hack.txt +3 -0
- package/test/less-bom/errors/property-in-root.less +4 -0
- package/test/less-bom/errors/property-in-root.txt +4 -0
- package/test/less-bom/errors/property-in-root2.less +1 -0
- package/test/less-bom/errors/property-in-root2.txt +4 -0
- package/test/less-bom/errors/property-in-root3.less +4 -0
- package/test/less-bom/errors/property-in-root3.txt +3 -0
- package/test/less-bom/errors/property-interp-not-defined.less +1 -0
- package/test/less-bom/errors/property-interp-not-defined.txt +2 -0
- package/test/less-bom/errors/recursive-variable.less +1 -0
- package/test/less-bom/errors/recursive-variable.txt +2 -0
- package/test/less-bom/errors/single-character.less +1 -0
- package/test/less-bom/errors/single-character.txt +2 -0
- package/test/less-bom/errors/svg-gradient1.less +3 -0
- package/test/less-bom/errors/svg-gradient1.txt +4 -0
- package/test/less-bom/errors/svg-gradient2.less +3 -0
- package/test/less-bom/errors/svg-gradient2.txt +4 -0
- package/test/less-bom/errors/svg-gradient3.less +3 -0
- package/test/less-bom/errors/svg-gradient3.txt +4 -0
- package/test/less-bom/errors/unit-function.less +3 -0
- package/test/less-bom/errors/unit-function.txt +4 -0
- package/test/less-bom/extend-chaining.less +91 -0
- package/test/less-bom/extend-clearfix.less +19 -0
- package/test/less-bom/extend-exact.less +46 -0
- package/test/less-bom/extend-media.less +24 -0
- package/test/less-bom/extend-nest.less +65 -0
- package/test/less-bom/extend-selector.less +99 -0
- package/test/less-bom/extend.less +81 -0
- package/test/less-bom/extract-and-length.less +133 -0
- package/test/less-bom/functions.less +201 -0
- package/test/less-bom/globalVars/extended.json +5 -0
- package/test/less-bom/globalVars/extended.less +10 -0
- package/test/less-bom/globalVars/simple.json +3 -0
- package/test/less-bom/globalVars/simple.less +3 -0
- package/test/less-bom/ie-filters.less +15 -0
- package/test/less-bom/import/deeper/deeper-2/url-import-2.less +3 -0
- package/test/less-bom/import/deeper/deeper-2/url-import.less +1 -0
- package/test/less-bom/import/deeper/import-once-test-a.less +1 -0
- package/test/less-bom/import/deeper/url-import.less +1 -0
- package/test/less-bom/import/import-and-relative-paths-test.less +17 -0
- package/test/less-bom/import/import-charset-test.less +1 -0
- package/test/less-bom/import/import-interpolation.less +2 -0
- package/test/less-bom/import/import-interpolation2.less +5 -0
- package/test/less-bom/import/import-once-test-c.less +6 -0
- package/test/less-bom/import/import-reference.less +89 -0
- package/test/less-bom/import/import-test-a.less +4 -0
- package/test/less-bom/import/import-test-b.less +8 -0
- package/test/less-bom/import/import-test-c.less +6 -0
- package/test/less-bom/import/import-test-d.css +1 -0
- package/test/less-bom/import/import-test-e.less +2 -0
- package/test/less-bom/import/import-test-f.less +5 -0
- package/test/less-bom/import/imports/font.less +8 -0
- package/test/less-bom/import/imports/logo.less +5 -0
- package/test/less-bom/import/interpolation-vars.less +6 -0
- package/test/less-bom/import/invalid-css.less +1 -0
- package/test/less-bom/import/urls.less +1 -0
- package/test/less-bom/import-inline.less +3 -0
- package/test/less-bom/import-interpolation.less +8 -0
- package/test/less-bom/import-once.less +6 -0
- package/test/less-bom/import-reference.less +23 -0
- package/test/less-bom/import.less +30 -0
- package/test/less-bom/include-path/include-path.less +6 -0
- package/test/less-bom/javascript.less +38 -0
- package/test/less-bom/lazy-eval.less +6 -0
- package/test/less-bom/legacy/legacy.less +7 -0
- package/test/less-bom/media.less +234 -0
- package/test/less-bom/merge.less +78 -0
- package/test/less-bom/mixins-args.less +215 -0
- package/test/less-bom/mixins-closure.less +26 -0
- package/test/less-bom/mixins-guards-default-func.less +195 -0
- package/test/less-bom/mixins-guards.less +271 -0
- package/test/less-bom/mixins-important.less +37 -0
- package/test/less-bom/mixins-interpolated.less +75 -0
- package/test/less-bom/mixins-named-args.less +36 -0
- package/test/less-bom/mixins-nested.less +22 -0
- package/test/less-bom/mixins-pattern.less +102 -0
- package/test/less-bom/mixins.less +145 -0
- package/test/less-bom/modifyVars/extended.json +5 -0
- package/test/less-bom/modifyVars/extended.less +11 -0
- package/test/less-bom/nested-gradient-with-svg-gradient/mixin-consumer.less +5 -0
- package/test/less-bom/nested-gradient-with-svg-gradient/svg-gradient-mixin.less +15 -0
- package/test/less-bom/no-js-errors/no-js-errors.less +3 -0
- package/test/less-bom/no-js-errors/no-js-errors.txt +4 -0
- package/test/less-bom/no-output.less +2 -0
- package/test/less-bom/operations.less +62 -0
- package/test/less-bom/parens.less +45 -0
- package/test/less-bom/property-name-interp.less +56 -0
- package/test/less-bom/rulesets.less +30 -0
- package/test/less-bom/scope.less +104 -0
- package/test/less-bom/selectors.less +174 -0
- package/test/less-bom/sourcemaps/basic.json +3 -0
- package/test/less-bom/sourcemaps/basic.less +27 -0
- package/test/less-bom/sourcemaps/imported.css +7 -0
- package/test/less-bom/static-urls/urls.less +33 -0
- package/test/less-bom/strict-units/strict-units.less +4 -0
- package/test/less-bom/strings.less +73 -0
- package/test/less-bom/url-args/urls.less +63 -0
- package/test/less-bom/urls.less +94 -0
- package/test/less-bom/variables-in-at-rules.less +20 -0
- package/test/less-bom/variables.less +119 -0
- package/test/less-bom/whitespace.less +44 -0
- package/test/less-test.js +127 -28
- package/test/modify-vars.js +6 -4
package/test/copy-bom.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*jshint latedef: nofunc */
|
|
2
|
+
|
|
3
|
+
// This is used to copy a folder (the test/less/* files & sub-folders), adding a BOM to the start of each LESS and CSS file.
|
|
4
|
+
// This is a based on the copySync method from fs-extra (https://github.com/jprichardson/node-fs-extra/).
|
|
5
|
+
|
|
6
|
+
module.exports = function() {
|
|
7
|
+
var path = require('path'),
|
|
8
|
+
fs = require('fs');
|
|
9
|
+
|
|
10
|
+
var BUF_LENGTH = 64 * 1024;
|
|
11
|
+
var _buff = new Buffer(BUF_LENGTH);
|
|
12
|
+
|
|
13
|
+
function copyFolderWithBom(src, dest) {
|
|
14
|
+
var stats = fs.lstatSync(src);
|
|
15
|
+
var destFolder = path.dirname(dest);
|
|
16
|
+
var destFolderExists = fs.existsSync(destFolder);
|
|
17
|
+
var performCopy = false;
|
|
18
|
+
|
|
19
|
+
if (stats.isFile()) {
|
|
20
|
+
if (!destFolderExists) {
|
|
21
|
+
fs.mkdirSync(destFolder);
|
|
22
|
+
}
|
|
23
|
+
if (src.match(/\.(css|less)$/)) {
|
|
24
|
+
copyFileAddingBomSync(src, dest);
|
|
25
|
+
} else {
|
|
26
|
+
copyFileSync(src, dest);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else if (stats.isDirectory()) {
|
|
30
|
+
if (!fs.existsSync(destFolder)) {
|
|
31
|
+
fs.mkdirSync(destFolder);
|
|
32
|
+
}
|
|
33
|
+
if (!fs.existsSync(dest)) {
|
|
34
|
+
fs.mkdirSync(dest);
|
|
35
|
+
}
|
|
36
|
+
fs.readdirSync(src).forEach(function(d) {
|
|
37
|
+
if (d !== 'bom') {
|
|
38
|
+
copyFolderWithBom(path.join(src, d), path.join(dest, d));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function copyFileAddingBomSync(srcFile, destFile) {
|
|
45
|
+
var contents = fs.readFileSync(srcFile, { encoding: 'utf8' });
|
|
46
|
+
if (!contents.length || contents.charCodeAt(0) !== 0xFEFF) {
|
|
47
|
+
contents = '\ufeff' + contents;
|
|
48
|
+
}
|
|
49
|
+
fs.writeFileSync(destFile, contents, { encoding: 'utf8' });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function copyFileSync(srcFile, destFile) {
|
|
53
|
+
var fdr = fs.openSync(srcFile, 'r')
|
|
54
|
+
var stat = fs.fstatSync(fdr)
|
|
55
|
+
var fdw = fs.openSync(destFile, 'w', stat.mode)
|
|
56
|
+
var bytesRead = 1
|
|
57
|
+
var pos = 0
|
|
58
|
+
|
|
59
|
+
while (bytesRead > 0) {
|
|
60
|
+
bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos)
|
|
61
|
+
fs.writeSync(fdw, _buff, 0, bytesRead)
|
|
62
|
+
pos += bytesRead
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
fs.closeSync(fdr)
|
|
66
|
+
fs.closeSync(fdw)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
copyFolderWithBom: copyFolderWithBom
|
|
71
|
+
};
|
|
72
|
+
};
|
package/test/css/comments.css
CHANGED
package/test/css/css-3.css
CHANGED
package/test/css/functions.css
CHANGED
|
@@ -127,6 +127,7 @@
|
|
|
127
127
|
mixt: rgba(255, 0, 0, 0.5);
|
|
128
128
|
}
|
|
129
129
|
#built-in .is-a {
|
|
130
|
+
ruleset: true;
|
|
130
131
|
color: true;
|
|
131
132
|
color1: true;
|
|
132
133
|
color2: true;
|
|
@@ -138,6 +139,7 @@
|
|
|
138
139
|
percent: true;
|
|
139
140
|
em: true;
|
|
140
141
|
cat: true;
|
|
142
|
+
no-unit-is-empty: true;
|
|
141
143
|
case-insensitive-1: true;
|
|
142
144
|
case-insensitive-2: true;
|
|
143
145
|
}
|
|
@@ -34,6 +34,14 @@ div#id.class[a=1][b=2].class:not(1) {
|
|
|
34
34
|
.visible + .visible .sub {
|
|
35
35
|
color: green;
|
|
36
36
|
}
|
|
37
|
+
@supports (something: else) {
|
|
38
|
+
.class {
|
|
39
|
+
something: else;
|
|
40
|
+
}
|
|
41
|
+
.nestedToo .class {
|
|
42
|
+
something: else;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
37
45
|
.b {
|
|
38
46
|
color: red;
|
|
39
47
|
color: green;
|
|
@@ -66,3 +74,20 @@ div#id.class[a=1][b=2].class:not(1) {
|
|
|
66
74
|
color: red;
|
|
67
75
|
}
|
|
68
76
|
}
|
|
77
|
+
.test {
|
|
78
|
+
color: red;
|
|
79
|
+
}
|
|
80
|
+
.test:first-child {
|
|
81
|
+
color: blue;
|
|
82
|
+
}
|
|
83
|
+
@keyframes some-name {
|
|
84
|
+
property: value;
|
|
85
|
+
}
|
|
86
|
+
@supports (animation-name: test) {
|
|
87
|
+
@keyframes some-name {
|
|
88
|
+
property: value;
|
|
89
|
+
}
|
|
90
|
+
.selector {
|
|
91
|
+
color: red;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
body {
|
|
2
|
+
width: 100%;
|
|
3
|
+
}
|
|
4
|
+
data-uri {
|
|
5
|
+
property: url("data:image/svg+xml,%3Csvg%20height%3D%22100%22%20width%3D%22100%22%3E%0A%20%20%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2240%22%20stroke%3D%22black%22%20stroke-width%3D%221%22%20fill%3D%22blue%22%20%2F%3E%0A%3C%2Fsvg%3E");
|
|
6
|
+
}
|
package/test/css/selectors.css
CHANGED
|
@@ -119,7 +119,7 @@ p a span {
|
|
|
119
119
|
.bloodred {
|
|
120
120
|
color: green;
|
|
121
121
|
}
|
|
122
|
-
#blood.blood.red.black {
|
|
122
|
+
#blood.blood.red.black:blood {
|
|
123
123
|
color: black;
|
|
124
124
|
}
|
|
125
125
|
:nth-child(3) {
|
|
@@ -154,3 +154,12 @@ blank blank blank blank blank blank blank blank blank blank blank blank blank bl
|
|
|
154
154
|
.blood {
|
|
155
155
|
color: red;
|
|
156
156
|
}
|
|
157
|
+
.foo:not(.tst.only-nested .level2:hover) {
|
|
158
|
+
test: only-nested;
|
|
159
|
+
}
|
|
160
|
+
.foo.nestend-and-non-nested:not(.tst.nestend-and-non-nested:hover) {
|
|
161
|
+
test: nestend-and-non-nested;
|
|
162
|
+
}
|
|
163
|
+
.selector:not(:hover) {
|
|
164
|
+
test: global scope;
|
|
165
|
+
}
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
uri-2: url("data:text/html,%3Ch1%3EThis%20page%20is%20100%25%20Awesome.%3C%2Fh1%3E%0A");
|
|
47
47
|
}
|
|
48
48
|
#svg-functions {
|
|
49
|
-
background-image: url('data:image/svg+xml
|
|
50
|
-
background-image: url('data:image/svg+xml
|
|
51
|
-
background-image: url('data:image/svg+xml
|
|
49
|
+
background-image: url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%201%201%22%20preserveAspectRatio%3D%22none%22%3E%3ClinearGradient%20id%3D%22gradient%22%20gradientUnits%3D%22userSpaceOnUse%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%220%25%22%20y2%3D%22100%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23000000%22%2F%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23ffffff%22%2F%3E%3C%2FlinearGradient%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%221%22%20height%3D%221%22%20fill%3D%22url(%23gradient)%22%20%2F%3E%3C%2Fsvg%3E');
|
|
50
|
+
background-image: url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%201%201%22%20preserveAspectRatio%3D%22none%22%3E%3ClinearGradient%20id%3D%22gradient%22%20gradientUnits%3D%22userSpaceOnUse%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%220%25%22%20y2%3D%22100%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23000000%22%2F%3E%3Cstop%20offset%3D%223%25%22%20stop-color%3D%22%23ffa500%22%2F%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23ffffff%22%2F%3E%3C%2FlinearGradient%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%221%22%20height%3D%221%22%20fill%3D%22url(%23gradient)%22%20%2F%3E%3C%2Fsvg%3E');
|
|
51
|
+
background-image: url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%201%201%22%20preserveAspectRatio%3D%22none%22%3E%3ClinearGradient%20id%3D%22gradient%22%20gradientUnits%3D%22userSpaceOnUse%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%220%25%22%20y2%3D%22100%25%22%3E%3Cstop%20offset%3D%221%25%22%20stop-color%3D%22%23c4c4c4%22%2F%3E%3Cstop%20offset%3D%223%25%22%20stop-color%3D%22%23ffa500%22%2F%3E%3Cstop%20offset%3D%225%25%22%20stop-color%3D%22%23008000%22%2F%3E%3Cstop%20offset%3D%2295%25%22%20stop-color%3D%22%23ffffff%22%2F%3E%3C%2FlinearGradient%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%221%22%20height%3D%221%22%20fill%3D%22url(%23gradient)%22%20%2F%3E%3C%2Fsvg%3E');
|
|
52
52
|
}
|
|
53
53
|
#data-uri-with-spaces {
|
|
54
54
|
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
package/test/css/urls.css
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
@import "css/background.css";
|
|
2
2
|
@import "import/import-test-d.css";
|
|
3
3
|
@import "file.css";
|
|
4
|
+
.gray-gradient {
|
|
5
|
+
background: url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%201%201%22%20preserveAspectRatio%3D%22none%22%3E%3ClinearGradient%20id%3D%22gradient%22%20gradientUnits%3D%22userSpaceOnUse%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%220%25%22%20y2%3D%22100%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23999999%22%20stop-opacity%3D%220%22%2F%3E%3Cstop%20offset%3D%2260%25%22%20stop-color%3D%22%23999999%22%20stop-opacity%3D%220.05%22%2F%3E%3Cstop%20offset%3D%2270%25%22%20stop-color%3D%22%23999999%22%20stop-opacity%3D%220.1%22%2F%3E%3Cstop%20offset%3D%2273%25%22%20stop-color%3D%22%23999999%22%20stop-opacity%3D%220.15%22%2F%3E%3Cstop%20offset%3D%2275%25%22%20stop-color%3D%22%23999999%22%20stop-opacity%3D%220.2%22%2F%3E%3Cstop%20offset%3D%2280%25%22%20stop-color%3D%22%23999999%22%20stop-opacity%3D%220.25%22%2F%3E%3Cstop%20offset%3D%2285%25%22%20stop-color%3D%22%23999999%22%20stop-opacity%3D%220.3%22%2F%3E%3Cstop%20offset%3D%2288%25%22%20stop-color%3D%22%23999999%22%20stop-opacity%3D%220.35%22%2F%3E%3Cstop%20offset%3D%2290%25%22%20stop-color%3D%22%23999999%22%20stop-opacity%3D%220.4%22%2F%3E%3Cstop%20offset%3D%2295%25%22%20stop-color%3D%22%23999999%22%20stop-opacity%3D%220.45%22%2F%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23999999%22%20stop-opacity%3D%220.5%22%2F%3E%3C%2FlinearGradient%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%221%22%20height%3D%221%22%20fill%3D%22url(%23gradient)%22%20%2F%3E%3C%2Fsvg%3E');
|
|
6
|
+
}
|
|
4
7
|
@font-face {
|
|
5
8
|
src: url("/fonts/garamond-pro.ttf");
|
|
6
9
|
src: local(Futura-Medium), url(fonts.svg#MyGeometricModern) format("svg");
|
|
@@ -54,6 +57,7 @@
|
|
|
54
57
|
}
|
|
55
58
|
#data-uri {
|
|
56
59
|
uri: url("data:image/jpeg;base64,bm90IGFjdHVhbGx5IGEganBlZyBmaWxlCg==");
|
|
60
|
+
background-image: url("data:image/jpeg;base64,bm90IGFjdHVhbGx5IGEganBlZyBmaWxlCg=="), url("data:image/jpeg;base64,bm90IGFjdHVhbGx5IGEganBlZyBmaWxlCg==");
|
|
57
61
|
uri-fragment: url("data:image/jpeg;base64,bm90IGFjdHVhbGx5IGEganBlZyBmaWxlCg==#fragment");
|
|
58
62
|
}
|
|
59
63
|
#data-uri-guess {
|
|
@@ -63,13 +67,17 @@
|
|
|
63
67
|
uri-1: url("data:text/html,%3Ch1%3EThis%20page%20is%20100%25%20Awesome.%3C%2Fh1%3E%0A");
|
|
64
68
|
uri-2: url("data:text/html,%3Ch1%3EThis%20page%20is%20100%25%20Awesome.%3C%2Fh1%3E%0A");
|
|
65
69
|
}
|
|
66
|
-
#
|
|
70
|
+
#file-functions {
|
|
67
71
|
uri: url('../data/data-uri-fail.png');
|
|
72
|
+
svg-not-base-64: url("data:image/svg+xml,%3Csvg%20height%3D%22100%22%20width%3D%22100%22%3E%0A%20%20%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2240%22%20stroke%3D%22black%22%20stroke-width%3D%221%22%20fill%3D%22blue%22%20%2F%3E%0A%3C%2Fsvg%3E");
|
|
73
|
+
size: 640px 430px;
|
|
74
|
+
width: 640px;
|
|
75
|
+
height: 430px;
|
|
68
76
|
}
|
|
69
77
|
#svg-functions {
|
|
70
|
-
background-image: url('data:image/svg+xml
|
|
71
|
-
background-image: url('data:image/svg+xml
|
|
72
|
-
background-image: url('data:image/svg+xml
|
|
78
|
+
background-image: url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%201%201%22%20preserveAspectRatio%3D%22none%22%3E%3ClinearGradient%20id%3D%22gradient%22%20gradientUnits%3D%22userSpaceOnUse%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%220%25%22%20y2%3D%22100%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23000000%22%2F%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23ffffff%22%2F%3E%3C%2FlinearGradient%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%221%22%20height%3D%221%22%20fill%3D%22url(%23gradient)%22%20%2F%3E%3C%2Fsvg%3E');
|
|
79
|
+
background-image: url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%201%201%22%20preserveAspectRatio%3D%22none%22%3E%3ClinearGradient%20id%3D%22gradient%22%20gradientUnits%3D%22userSpaceOnUse%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%220%25%22%20y2%3D%22100%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23000000%22%2F%3E%3Cstop%20offset%3D%223%25%22%20stop-color%3D%22%23ffa500%22%2F%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23ffffff%22%2F%3E%3C%2FlinearGradient%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%221%22%20height%3D%221%22%20fill%3D%22url(%23gradient)%22%20%2F%3E%3C%2Fsvg%3E');
|
|
80
|
+
background-image: url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%201%201%22%20preserveAspectRatio%3D%22none%22%3E%3ClinearGradient%20id%3D%22gradient%22%20gradientUnits%3D%22userSpaceOnUse%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%220%25%22%20y2%3D%22100%25%22%3E%3Cstop%20offset%3D%221%25%22%20stop-color%3D%22%23c4c4c4%22%2F%3E%3Cstop%20offset%3D%223%25%22%20stop-color%3D%22%23ffa500%22%2F%3E%3Cstop%20offset%3D%225%25%22%20stop-color%3D%22%23008000%22%2F%3E%3Cstop%20offset%3D%2295%25%22%20stop-color%3D%22%23ffffff%22%2F%3E%3C%2FlinearGradient%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%221%22%20height%3D%221%22%20fill%3D%22url(%23gradient)%22%20%2F%3E%3C%2Fsvg%3E');
|
|
73
81
|
}
|
|
74
82
|
@font-face {
|
|
75
83
|
font-family: 'MyWebFont';
|
package/test/css/variables.css
CHANGED
|
@@ -22,7 +22,13 @@
|
|
|
22
22
|
multi-important: #888888 #888888, 'Trebuchet' !important;
|
|
23
23
|
multi: something 'A', B, C, 'Trebuchet';
|
|
24
24
|
}
|
|
25
|
-
.variable-names {
|
|
25
|
+
.variable-names .quoted {
|
|
26
|
+
name: 'hello';
|
|
27
|
+
}
|
|
28
|
+
.variable-names .unquoted {
|
|
29
|
+
name: 'hello';
|
|
30
|
+
}
|
|
31
|
+
.variable-names .color-keyword {
|
|
26
32
|
name: 'hello';
|
|
27
33
|
}
|
|
28
34
|
.alpha {
|
package/test/index.js
CHANGED
|
@@ -4,17 +4,19 @@ var lessTest = require("./less-test"),
|
|
|
4
4
|
stylize = require('../lib/less-node/lessc-helper').stylize;
|
|
5
5
|
|
|
6
6
|
function getErrorPathReplacementFunction(dir) {
|
|
7
|
-
return function(input) {
|
|
8
|
-
return input.replace(
|
|
9
|
-
|
|
10
|
-
.replace(
|
|
11
|
-
.replace(
|
|
12
|
-
.replace(
|
|
7
|
+
return function(input, baseDir) {
|
|
8
|
+
return input.replace(/\{path\}/g, path.join(process.cwd(), baseDir, dir + "/"))
|
|
9
|
+
.replace(/\{node\}/g, "")
|
|
10
|
+
.replace(/\{\/node\}/g, "")
|
|
11
|
+
.replace(/\{pathrel\}/g, path.join(baseDir, dir + "/"))
|
|
12
|
+
.replace(/\{pathhref\}/g, "")
|
|
13
|
+
.replace(/\{404status\}/g, "")
|
|
13
14
|
.replace(/\r\n/g, '\n');
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
console.log("\n" + stylize("Less", 'underline') + "\n");
|
|
19
|
+
lessTester.prepBomTest();
|
|
18
20
|
lessTester.runTestSet({strictMath: true, relativeUrls: true, silent: true});
|
|
19
21
|
lessTester.runTestSet({strictMath: true, strictUnits: true}, "errors/",
|
|
20
22
|
lessTester.testErrors, null, getErrorPathReplacementFunction("errors"));
|
|
@@ -32,17 +34,19 @@ lessTester.runTestSet({strictMath: true, strictUnits: true}, "strict-units/");
|
|
|
32
34
|
lessTester.runTestSet({}, "legacy/");
|
|
33
35
|
lessTester.runTestSet({strictMath: true, strictUnits: true, sourceMap: true, globalVars: true }, "sourcemaps/",
|
|
34
36
|
lessTester.testSourcemap, null, null,
|
|
35
|
-
function(filename, type) {
|
|
37
|
+
function(filename, type, baseFolder) {
|
|
36
38
|
if (type === "vars") {
|
|
37
|
-
return path.join(
|
|
39
|
+
return path.join(baseFolder, filename) + '.json';
|
|
38
40
|
}
|
|
39
41
|
return path.join('test/sourcemaps', filename) + '.json';
|
|
40
42
|
});
|
|
41
43
|
lessTester.runTestSet({globalVars: true, banner: "/**\n * Test\n */\n"}, "globalVars/",
|
|
42
|
-
null, null, null, function(name) { return path.join(
|
|
44
|
+
null, null, null, function(name, type, baseFolder) { return path.join(baseFolder, name) + '.json'; });
|
|
43
45
|
lessTester.runTestSet({modifyVars: true}, "modifyVars/",
|
|
44
|
-
null, null, null, function(name) { return path.join(
|
|
46
|
+
null, null, null, function(name, type, baseFolder) { return path.join(baseFolder, name) + '.json'; });
|
|
45
47
|
lessTester.runTestSet({urlArgs: '424242'}, "url-args/");
|
|
48
|
+
lessTester.runTestSet({paths: ['test/data/', 'test/less/import/']}, "include-path/");
|
|
46
49
|
lessTester.testSyncronous({syncImport: true}, "import");
|
|
47
50
|
lessTester.testSyncronous({syncImport: true}, "css");
|
|
48
51
|
lessTester.testNoOptions();
|
|
52
|
+
lessTester.finished();
|
package/test/less/comments.less
CHANGED
package/test/less/css-3.less
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
FileError: '{pathhref}file-does-not-exist.less' wasn't found{404status} 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,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
|
+
x
|
package/test/less/functions.less
CHANGED
|
@@ -137,6 +137,10 @@
|
|
|
137
137
|
mixt: mix(#ff0000, transparent);
|
|
138
138
|
|
|
139
139
|
.is-a {
|
|
140
|
+
@rules: {
|
|
141
|
+
color: red;
|
|
142
|
+
};
|
|
143
|
+
ruleset: isruleset(@rules);
|
|
140
144
|
color: iscolor(#ddd);
|
|
141
145
|
color1: iscolor(red);
|
|
142
146
|
color2: iscolor(rgb(0, 0, 0));
|
|
@@ -148,6 +152,7 @@
|
|
|
148
152
|
percent: ispercentage(32%);
|
|
149
153
|
em: isem(32em);
|
|
150
154
|
cat: isunit(32cat, cat);
|
|
155
|
+
no-unit-is-empty: isunit(32, '');
|
|
151
156
|
case-insensitive-1: isunit(32CAT, cat);
|
|
152
157
|
case-insensitive-2: isunit(32px, PX);
|
|
153
158
|
}
|
|
@@ -48,4 +48,42 @@
|
|
|
48
48
|
@media (max-size: @max-size) {
|
|
49
49
|
color: red;
|
|
50
50
|
}
|
|
51
|
+
}
|
|
52
|
+
//https://github.com/less/less.js/issues/2359
|
|
53
|
+
@supports (something: else) {
|
|
54
|
+
.class {
|
|
55
|
+
something: else;
|
|
56
|
+
}
|
|
57
|
+
.nestedToo {
|
|
58
|
+
.class {
|
|
59
|
+
something: else;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
.invisible {
|
|
63
|
+
something: else;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//https://github.com/less/less.js/issues/1979
|
|
67
|
+
.mixin-with-nested-selectors() {
|
|
68
|
+
.test {
|
|
69
|
+
color: red;
|
|
70
|
+
&:first-child {
|
|
71
|
+
color: blue;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
.mixin-with-directives(@keyframeName) {
|
|
76
|
+
@keyframes @keyframeName {
|
|
77
|
+
@rules1();
|
|
78
|
+
}
|
|
79
|
+
@supports (animation-name: test) {
|
|
80
|
+
@keyframes @keyframeName {
|
|
81
|
+
@rules2();
|
|
82
|
+
}
|
|
83
|
+
.selector {
|
|
84
|
+
color: red;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
@rules1: {property: value;};
|
|
88
|
+
@rules2: {property: value;};
|
|
51
89
|
}
|
package/test/less/import.less
CHANGED
|
@@ -23,3 +23,15 @@
|
|
|
23
23
|
.mixin !important;
|
|
24
24
|
.mixin(9);
|
|
25
25
|
}
|
|
26
|
+
.size(@aaa: auto) {
|
|
27
|
+
.set-width(@aaa) {
|
|
28
|
+
width: @aaa;
|
|
29
|
+
}
|
|
30
|
+
.set-width(@aaa);
|
|
31
|
+
}
|
|
32
|
+
.when-calling-nested-issue-2394 {
|
|
33
|
+
.size() !important;
|
|
34
|
+
}
|
|
35
|
+
.when-calling-nested-with-param-issue-2394 {
|
|
36
|
+
.size(10px) !important;
|
|
37
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.gradient-mixin(@color) {
|
|
2
|
+
background: svg-gradient(to bottom,
|
|
3
|
+
fade(@color, 0%) 0%,
|
|
4
|
+
fade(@color, 5%) 60%,
|
|
5
|
+
fade(@color, 10%) 70%,
|
|
6
|
+
fade(@color, 15%) 73%,
|
|
7
|
+
fade(@color, 20%) 75%,
|
|
8
|
+
fade(@color, 25%) 80%,
|
|
9
|
+
fade(@color, 30%) 85%,
|
|
10
|
+
fade(@color, 35%) 88%,
|
|
11
|
+
fade(@color, 40%) 90%,
|
|
12
|
+
fade(@color, 45%) 95%,
|
|
13
|
+
fade(@color, 50%) 100%
|
|
14
|
+
);
|
|
15
|
+
}
|
package/test/less/selectors.less
CHANGED
|
@@ -117,13 +117,13 @@ a {
|
|
|
117
117
|
color: green;
|
|
118
118
|
}
|
|
119
119
|
.red {
|
|
120
|
-
#@{theme}.@{theme}&.black {
|
|
120
|
+
#@{theme}.@{theme}&.black:@{theme} {
|
|
121
121
|
color:black;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
@num: 3;
|
|
125
125
|
:nth-child(@{num}) {
|
|
126
|
-
|
|
126
|
+
selector: interpolated;
|
|
127
127
|
}
|
|
128
128
|
.test {
|
|
129
129
|
&:nth-child(@{num}) {
|
|
@@ -132,7 +132,7 @@ a {
|
|
|
132
132
|
&:nth-child(odd):not(:nth-child(3)) {
|
|
133
133
|
color: #ff0000;
|
|
134
134
|
}
|
|
135
|
-
}
|
|
135
|
+
}
|
|
136
136
|
[prop],
|
|
137
137
|
[prop=10%],
|
|
138
138
|
[prop="value@{num}"],
|
|
@@ -156,4 +156,19 @@ blank blank blank blank blank blank blank blank blank blank blank blank blank bl
|
|
|
156
156
|
*/
|
|
157
157
|
@{selector} {
|
|
158
158
|
color: red;
|
|
159
|
-
}
|
|
159
|
+
}
|
|
160
|
+
.only-nested {
|
|
161
|
+
.level2 {
|
|
162
|
+
.foo:not(.tst&:hover) {
|
|
163
|
+
test: only-nested;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
.nestend-and-non-nested {
|
|
168
|
+
.foo&:not(.tst&:hover) {
|
|
169
|
+
test: nestend-and-non-nested;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
.selector:not(&:hover) {
|
|
173
|
+
test: global scope;
|
|
174
|
+
}
|