less 2.2.2 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Changelog.md +17 -0
- data/Gemfile +7 -3
- data/README.md +29 -13
- data/bin/lessc +3 -1
- data/less.gemspec +2 -6
- data/lib/less/defaults.rb +3 -3
- data/lib/less/java_script/rhino_context.rb +17 -27
- data/lib/less/java_script/v8_context.rb +11 -11
- data/lib/less/js/.gitattributes +10 -0
- data/lib/less/js/.gitignore +24 -0
- data/lib/less/js/.jshintrc +11 -0
- data/lib/less/js/.npmignore +1 -0
- data/lib/less/js/.travis.yml +8 -0
- data/lib/less/js/CHANGELOG.md +299 -0
- data/lib/less/js/CONTRIBUTING.md +50 -0
- data/lib/less/js/Gruntfile.js +298 -0
- data/lib/less/js/README.md +43 -12
- data/lib/less/js/benchmark/benchmark.less +194 -194
- data/lib/less/js/benchmark/less-benchmark.js +9 -10
- data/lib/less/js/bin/lessc +310 -37
- data/lib/less/js/bower.json +18 -0
- data/lib/less/js/build/README.md +51 -0
- data/lib/less/js/build/amd.js +1 -1
- data/lib/less/js/build/browser-header.js +4 -0
- data/lib/less/js/build/build.yml +162 -0
- data/lib/less/js/build/require-rhino.js +7 -2
- data/lib/less/js/build/rhino-header.js +4 -0
- data/lib/less/js/build/rhino-modules.js +131 -0
- data/lib/less/js/build/tasks/.gitkeep +1 -0
- data/lib/less/js/build.gradle +347 -0
- data/lib/less/js/dist/less-1.3.1.js +4011 -0
- data/lib/less/js/dist/less-1.3.1.min.js +9 -0
- data/lib/less/js/dist/less-1.3.2.js +4401 -0
- data/lib/less/js/dist/less-1.3.2.min.js +9 -0
- data/lib/less/js/dist/less-1.3.3.js +4413 -0
- data/lib/less/js/dist/less-1.3.3.min.js +9 -0
- data/lib/less/js/dist/less-1.4.0-beta.js +5830 -0
- data/lib/less/js/dist/less-1.4.0-beta.min.js +11 -0
- data/lib/less/js/dist/less-1.4.0.js +5830 -0
- data/lib/less/js/dist/less-1.4.0.min.js +11 -0
- data/lib/less/js/dist/less-1.4.1.js +5837 -0
- data/lib/less/js/dist/less-1.4.1.min.js +11 -0
- data/lib/less/js/dist/less-1.4.2.js +5837 -0
- data/lib/less/js/dist/less-1.4.2.min.js +11 -0
- data/lib/less/js/dist/less-1.5.0.js +6914 -0
- data/lib/less/js/dist/less-1.5.0.min.js +13 -0
- data/lib/less/js/dist/less-1.5.1.js +6941 -0
- data/lib/less/js/dist/less-1.5.1.min.js +13 -0
- data/lib/less/js/dist/less-1.6.0.js +7485 -0
- data/lib/less/js/dist/less-1.6.0.min.js +16 -0
- data/lib/less/js/dist/less-1.6.1.js +7513 -0
- data/lib/less/js/dist/less-1.6.1.min.js +16 -0
- data/lib/less/js/dist/less-1.6.2.js +7624 -0
- data/lib/less/js/dist/less-1.6.2.min.js +16 -0
- data/lib/less/js/dist/less-1.6.3.js +7627 -0
- data/lib/less/js/dist/less-1.6.3.min.js +16 -0
- data/lib/less/js/dist/less-1.7.0.js +7921 -0
- data/lib/less/js/dist/less-1.7.0.min.js +16 -0
- data/lib/less/js/dist/less-rhino-1.3.1.js +3725 -0
- data/lib/less/js/dist/less-rhino-1.3.2.js +3990 -0
- data/lib/less/js/dist/less-rhino-1.3.3.js +4002 -0
- data/lib/less/js/dist/less-rhino-1.4.0.js +4273 -0
- data/lib/less/js/dist/less-rhino-1.5.1.js +6831 -0
- data/lib/less/js/dist/less-rhino-1.6.2.js +9017 -0
- data/lib/less/js/dist/less-rhino-1.6.3.js +9020 -0
- data/lib/less/js/dist/less-rhino-1.7.0.js +9301 -0
- data/lib/less/js/dist/lessc-rhino-1.6.2.js +449 -0
- data/lib/less/js/dist/lessc-rhino-1.6.3.js +449 -0
- data/lib/less/js/dist/lessc-rhino-1.7.0.js +449 -0
- data/lib/less/js/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/lib/less/js/gradle/wrapper/gradle-wrapper.properties +6 -0
- data/lib/less/js/gradlew +164 -0
- data/lib/less/js/gradlew.bat +90 -0
- data/lib/less/js/lib/less/browser.js +547 -250
- data/lib/less/js/lib/less/encoder.js +4 -0
- data/lib/less/js/lib/less/env.js +136 -0
- data/lib/less/js/lib/less/extend-visitor.js +416 -0
- data/lib/less/js/lib/less/functions.js +576 -36
- data/lib/less/js/lib/less/import-visitor.js +142 -0
- data/lib/less/js/lib/less/index.js +187 -83
- data/lib/less/js/lib/less/join-selector-visitor.js +44 -0
- data/lib/less/js/lib/less/lessc_helper.js +82 -0
- data/lib/less/js/lib/less/parser.js +1286 -523
- data/lib/less/js/lib/less/rhino.js +415 -29
- data/lib/less/js/lib/less/source-map-output.js +141 -0
- data/lib/less/js/lib/less/to-css-visitor.js +240 -0
- data/lib/less/js/lib/less/tree/alpha.js +17 -5
- data/lib/less/js/lib/less/tree/anonymous.js +25 -4
- data/lib/less/js/lib/less/tree/assignment.js +17 -5
- data/lib/less/js/lib/less/tree/call.js +36 -13
- data/lib/less/js/lib/less/tree/color.js +119 -31
- data/lib/less/js/lib/less/tree/comment.js +18 -4
- data/lib/less/js/lib/less/tree/condition.js +35 -28
- data/lib/less/js/lib/less/tree/detached-ruleset.js +20 -0
- data/lib/less/js/lib/less/tree/dimension.js +291 -16
- data/lib/less/js/lib/less/tree/directive.js +56 -22
- data/lib/less/js/lib/less/tree/element.js +78 -17
- data/lib/less/js/lib/less/tree/expression.js +39 -8
- data/lib/less/js/lib/less/tree/extend.js +53 -0
- data/lib/less/js/lib/less/tree/import.js +81 -36
- data/lib/less/js/lib/less/tree/javascript.js +17 -10
- data/lib/less/js/lib/less/tree/keyword.js +8 -3
- data/lib/less/js/lib/less/tree/media.js +70 -27
- data/lib/less/js/lib/less/tree/mixin.js +250 -70
- data/lib/less/js/lib/less/tree/negative.js +24 -0
- data/lib/less/js/lib/less/tree/operation.js +38 -13
- data/lib/less/js/lib/less/tree/paren.js +9 -2
- data/lib/less/js/lib/less/tree/quoted.js +29 -10
- data/lib/less/js/lib/less/tree/rule.js +77 -29
- data/lib/less/js/lib/less/tree/ruleset-call.js +16 -0
- data/lib/less/js/lib/less/tree/ruleset.js +445 -107
- data/lib/less/js/lib/less/tree/selector.js +117 -30
- data/lib/less/js/lib/less/tree/unicode-descriptor.js +15 -0
- data/lib/less/js/lib/less/tree/url.js +43 -15
- data/lib/less/js/lib/less/tree/value.js +16 -6
- data/lib/less/js/lib/less/tree/variable.js +26 -8
- data/lib/less/js/lib/less/tree.js +82 -2
- data/lib/less/js/lib/less/visitor.js +146 -0
- data/lib/less/js/lib/source-map/source-map-0.1.31.js +1933 -0
- data/lib/less/js/lib/source-map/source-map-footer.js +4 -0
- data/lib/less/js/lib/source-map/source-map-header.js +3 -0
- data/lib/less/js/package.json +86 -11
- data/lib/less/js/test/browser/common.js +201 -0
- data/lib/less/js/test/browser/css/global-vars/simple.css +3 -0
- data/lib/less/js/test/browser/css/modify-vars/simple.css +8 -0
- data/lib/less/js/test/browser/css/postProcessor/postProcessor.css +4 -0
- data/lib/less/js/test/browser/css/relative-urls/urls.css +35 -0
- data/lib/less/js/test/browser/css/rootpath/urls.css +35 -0
- data/lib/less/js/test/browser/css/rootpath-relative/urls.css +35 -0
- data/lib/less/js/test/browser/css/urls.css +53 -0
- data/lib/less/js/test/browser/es5.js +27 -0
- data/lib/less/js/test/browser/jasmine-html.js +681 -0
- data/lib/less/js/test/browser/jasmine.css +82 -0
- data/lib/less/js/test/browser/jasmine.js +2600 -0
- data/lib/less/js/test/browser/less/console-errors/test-error.less +3 -0
- data/lib/less/js/test/browser/less/console-errors/test-error.txt +2 -0
- data/lib/less/js/test/browser/less/global-vars/simple.less +3 -0
- data/lib/less/js/test/browser/less/imports/urls.less +4 -0
- data/lib/less/js/test/browser/less/imports/urls2.less +4 -0
- data/lib/less/js/test/browser/less/modify-vars/imports/simple2.less +4 -0
- data/lib/less/js/test/browser/less/modify-vars/simple.less +8 -0
- data/lib/less/js/test/browser/less/postProcessor/postProcessor.less +4 -0
- data/lib/less/js/test/browser/less/relative-urls/urls.less +33 -0
- data/lib/less/js/test/browser/less/rootpath/urls.less +33 -0
- data/lib/less/js/test/browser/less/rootpath-relative/urls.less +33 -0
- data/lib/less/js/test/browser/less/urls.less +57 -0
- data/lib/less/js/test/browser/phantom-runner.js +150 -0
- data/lib/less/js/test/browser/runner-browser-options.js +42 -0
- data/lib/less/js/test/browser/runner-browser-spec.js +12 -0
- data/lib/less/js/test/browser/runner-console-errors.js +5 -0
- data/lib/less/js/test/browser/runner-errors-options.js +5 -0
- data/lib/less/js/test/browser/runner-errors-spec.js +4 -0
- data/lib/less/js/test/browser/runner-global-vars-options.js +4 -0
- data/lib/less/js/test/browser/runner-global-vars-spec.js +3 -0
- data/lib/less/js/test/browser/runner-legacy-options.js +4 -0
- data/lib/less/js/test/browser/runner-legacy-spec.js +3 -0
- data/lib/less/js/test/browser/runner-main-options.js +15 -0
- data/lib/less/js/test/browser/runner-main-spec.js +3 -0
- data/lib/less/js/test/browser/runner-modify-vars-options.js +2 -0
- data/lib/less/js/test/browser/runner-modify-vars-spec.js +43 -0
- data/lib/less/js/test/browser/runner-no-js-errors-options.js +4 -0
- data/lib/less/js/test/browser/runner-no-js-errors-spec.js +4 -0
- data/lib/less/js/test/browser/runner-postProcessor-options.js +4 -0
- data/lib/less/js/test/browser/runner-postProcessor.js +3 -0
- data/lib/less/js/test/browser/runner-production-options.js +3 -0
- data/lib/less/js/test/browser/runner-production-spec.js +5 -0
- data/lib/less/js/test/browser/runner-relative-urls-options.js +3 -0
- data/lib/less/js/test/browser/runner-relative-urls-spec.js +3 -0
- data/lib/less/js/test/browser/runner-rootpath-options.js +3 -0
- data/lib/less/js/test/browser/runner-rootpath-relative-options.js +4 -0
- data/lib/less/js/test/browser/runner-rootpath-relative-spec.js +3 -0
- data/lib/less/js/test/browser/runner-rootpath-spec.js +3 -0
- data/lib/less/js/test/browser/test-runner-template.tmpl +47 -0
- data/lib/less/js/test/css/charsets.css +1 -0
- data/lib/less/js/test/css/colors.css +29 -0
- data/lib/less/js/test/css/comments.css +15 -2
- data/lib/less/js/test/css/compression/compression.css +3 -0
- data/lib/less/js/test/css/css-3.css +73 -2
- data/lib/less/js/test/css/css-escapes.css +4 -0
- data/lib/less/js/test/css/css-guards.css +37 -0
- data/lib/less/js/test/css/css.css +20 -14
- data/lib/less/js/test/css/debug/linenumbers-all.css +49 -0
- data/lib/less/js/test/css/debug/linenumbers-comments.css +40 -0
- data/lib/less/js/test/css/debug/linenumbers-mediaquery.css +40 -0
- data/lib/less/js/test/css/detached-rulesets.css +71 -0
- data/lib/less/js/test/css/empty.css +0 -0
- data/lib/less/js/test/css/extend-chaining.css +81 -0
- data/lib/less/js/test/css/extend-clearfix.css +19 -0
- data/lib/less/js/test/css/extend-exact.css +37 -0
- data/lib/less/js/test/css/extend-media.css +24 -0
- data/lib/less/js/test/css/extend-nest.css +57 -0
- data/lib/less/js/test/css/extend-selector.css +80 -0
- data/lib/less/js/test/css/extend.css +76 -0
- data/lib/less/js/test/css/extract-and-length.css +133 -0
- data/lib/less/js/test/css/functions.css +117 -2
- data/lib/less/js/test/css/globalVars/extended.css +12 -0
- data/lib/less/js/test/css/globalVars/simple.css +6 -0
- data/lib/less/js/test/css/ie-filters.css +7 -3
- data/lib/less/js/test/css/import-inline.css +5 -0
- data/lib/less/js/test/css/import-interpolation.css +6 -0
- data/lib/less/js/test/css/import-once.css +15 -0
- data/lib/less/js/test/css/import-reference.css +68 -0
- data/lib/less/js/test/css/import.css +23 -10
- data/lib/less/js/test/css/javascript.css +3 -2
- data/lib/less/js/test/css/legacy/legacy.css +7 -0
- data/lib/less/js/test/css/media.css +141 -1
- data/lib/less/js/test/css/merge.css +34 -0
- data/lib/less/js/test/css/mixins-args.css +41 -4
- data/lib/less/js/test/css/mixins-guards-default-func.css +129 -0
- data/lib/less/js/test/css/mixins-guards.css +24 -0
- data/lib/less/js/test/css/mixins-important.css +28 -0
- data/lib/less/js/test/css/mixins-interpolated.css +39 -0
- data/lib/less/js/test/css/mixins-named-args.css +27 -0
- data/lib/less/js/test/css/mixins-pattern.css +4 -0
- data/lib/less/js/test/css/mixins.css +70 -0
- data/lib/less/js/test/css/modifyVars/extended.css +9 -0
- data/lib/less/js/test/css/no-output.css +0 -0
- data/lib/less/js/test/css/parens.css +21 -5
- data/lib/less/js/test/css/property-name-interp.css +20 -0
- data/lib/less/js/test/css/scope.css +23 -0
- data/lib/less/js/test/css/selectors.css +84 -0
- data/lib/less/js/test/css/static-urls/urls.css +45 -0
- data/lib/less/js/test/css/strings.css +5 -2
- data/lib/less/js/test/css/url-args/urls.css +56 -0
- data/lib/less/js/test/css/urls.css +71 -0
- data/lib/less/js/test/css/variables-in-at-rules.css +18 -0
- data/lib/less/js/test/css/variables.css +22 -4
- data/lib/less/js/test/css/whitespace.css +4 -0
- data/lib/less/js/test/data/data-uri-fail.png +0 -0
- data/lib/less/js/test/data/image.jpg +1 -0
- data/lib/less/js/test/data/page.html +1 -0
- data/lib/less/js/test/index.js +45 -0
- data/lib/less/js/test/less/charsets.less +3 -0
- data/lib/less/js/test/less/colors.less +37 -4
- data/lib/less/js/test/less/comments.less +21 -3
- data/lib/less/js/test/less/compression/compression.less +36 -0
- data/lib/less/js/test/less/css-3.less +70 -6
- data/lib/less/js/test/less/css-escapes.less +6 -1
- data/lib/less/js/test/less/css-guards.less +102 -0
- data/lib/less/js/test/less/css.less +23 -15
- data/lib/less/js/test/less/debug/import/test.less +25 -0
- data/lib/less/js/test/less/debug/linenumbers.less +33 -0
- data/lib/less/js/test/less/detached-rulesets.less +103 -0
- data/lib/less/js/test/less/empty.less +0 -0
- data/lib/less/js/test/less/errors/add-mixed-units.less +3 -0
- data/lib/less/js/test/less/errors/add-mixed-units.txt +4 -0
- data/lib/less/js/test/less/errors/add-mixed-units2.less +3 -0
- data/lib/less/js/test/less/errors/add-mixed-units2.txt +4 -0
- data/lib/less/js/test/less/errors/at-rules-undefined-var.less +4 -0
- data/lib/less/js/test/less/errors/at-rules-undefined-var.txt +4 -0
- data/lib/less/js/test/less/errors/bad-variable-declaration1.less +1 -0
- data/lib/less/js/test/less/errors/bad-variable-declaration1.txt +2 -0
- data/lib/less/js/test/less/errors/color-func-invalid-color.less +3 -0
- data/lib/less/js/test/less/errors/color-func-invalid-color.txt +4 -0
- data/lib/less/js/test/less/errors/comment-in-selector.less +1 -0
- data/lib/less/js/test/less/errors/comment-in-selector.txt +2 -0
- data/lib/less/js/test/less/errors/css-guard-default-func.less +4 -0
- data/lib/less/js/test/less/errors/css-guard-default-func.txt +4 -0
- data/lib/less/js/test/less/errors/detached-ruleset-1.less +6 -0
- data/lib/less/js/test/less/errors/detached-ruleset-1.txt +4 -0
- data/lib/less/js/test/less/errors/detached-ruleset-2.less +6 -0
- data/lib/less/js/test/less/errors/detached-ruleset-2.txt +4 -0
- data/lib/less/js/test/less/errors/detached-ruleset-3.less +4 -0
- data/lib/less/js/test/less/errors/detached-ruleset-3.txt +4 -0
- data/lib/less/js/test/less/errors/detached-ruleset-4.less +5 -0
- data/lib/less/js/test/less/errors/detached-ruleset-4.txt +3 -0
- data/lib/less/js/test/less/errors/detached-ruleset-5.less +4 -0
- data/lib/less/js/test/less/errors/detached-ruleset-5.txt +3 -0
- data/lib/less/js/test/less/errors/detached-ruleset-6.less +5 -0
- data/lib/less/js/test/less/errors/detached-ruleset-6.txt +4 -0
- data/lib/less/js/test/less/errors/divide-mixed-units.less +3 -0
- data/lib/less/js/test/less/errors/divide-mixed-units.txt +4 -0
- data/lib/less/js/test/less/errors/extend-no-selector.less +3 -0
- data/lib/less/js/test/less/errors/extend-no-selector.txt +3 -0
- data/lib/less/js/test/less/errors/extend-not-at-end.less +3 -0
- data/lib/less/js/test/less/errors/extend-not-at-end.txt +3 -0
- data/lib/less/js/test/less/errors/import-missing.less +6 -0
- data/lib/less/js/test/less/errors/import-missing.txt +3 -0
- data/lib/less/js/test/less/errors/import-no-semi.less +1 -0
- data/lib/less/js/test/less/errors/import-no-semi.txt +2 -0
- data/lib/less/js/test/less/errors/import-subfolder1.less +1 -0
- data/lib/less/js/test/less/errors/import-subfolder1.txt +3 -0
- data/lib/less/js/test/less/errors/import-subfolder2.less +1 -0
- data/lib/less/js/test/less/errors/import-subfolder2.txt +4 -0
- data/lib/less/js/test/less/errors/imports/import-subfolder1.less +1 -0
- data/lib/less/js/test/less/errors/imports/import-subfolder2.less +1 -0
- data/lib/less/js/test/less/errors/imports/import-test.less +4 -0
- data/lib/less/js/test/less/errors/imports/subfolder/mixin-not-defined.less +1 -0
- data/lib/less/js/test/less/errors/imports/subfolder/parse-error-curly-bracket.less +1 -0
- data/lib/less/js/test/less/errors/javascript-error.less +3 -0
- data/lib/less/js/test/less/errors/javascript-error.txt +4 -0
- data/lib/less/js/test/less/errors/javascript-undefined-var.less +3 -0
- data/lib/less/js/test/less/errors/javascript-undefined-var.txt +4 -0
- data/lib/less/js/test/less/errors/mixed-mixin-definition-args-1.less +6 -0
- data/lib/less/js/test/less/errors/mixed-mixin-definition-args-1.txt +4 -0
- data/lib/less/js/test/less/errors/mixed-mixin-definition-args-2.less +6 -0
- data/lib/less/js/test/less/errors/mixed-mixin-definition-args-2.txt +4 -0
- data/lib/less/js/test/less/errors/mixin-not-defined.less +11 -0
- data/lib/less/js/test/less/errors/mixin-not-defined.txt +3 -0
- data/lib/less/js/test/less/errors/mixin-not-matched.less +6 -0
- data/lib/less/js/test/less/errors/mixin-not-matched.txt +3 -0
- data/lib/less/js/test/less/errors/mixin-not-matched2.less +6 -0
- data/lib/less/js/test/less/errors/mixin-not-matched2.txt +3 -0
- data/lib/less/js/test/less/errors/mixin-not-visible-in-scope-1.less +9 -0
- data/lib/less/js/test/less/errors/mixin-not-visible-in-scope-1.txt +4 -0
- data/lib/less/js/test/less/errors/mixins-guards-default-func-1.less +9 -0
- data/lib/less/js/test/less/errors/mixins-guards-default-func-1.txt +4 -0
- data/lib/less/js/test/less/errors/mixins-guards-default-func-2.less +9 -0
- data/lib/less/js/test/less/errors/mixins-guards-default-func-2.txt +4 -0
- data/lib/less/js/test/less/errors/mixins-guards-default-func-3.less +9 -0
- data/lib/less/js/test/less/errors/mixins-guards-default-func-3.txt +4 -0
- data/lib/less/js/test/less/errors/multiple-guards-on-css-selectors.less +4 -0
- data/lib/less/js/test/less/errors/multiple-guards-on-css-selectors.txt +4 -0
- data/lib/less/js/test/less/errors/multiple-guards-on-css-selectors2.less +4 -0
- data/lib/less/js/test/less/errors/multiple-guards-on-css-selectors2.txt +4 -0
- data/lib/less/js/test/less/errors/multiply-mixed-units.less +7 -0
- data/lib/less/js/test/less/errors/multiply-mixed-units.txt +4 -0
- data/lib/less/js/test/less/errors/parens-error-1.less +3 -0
- data/lib/less/js/test/less/errors/parens-error-1.txt +4 -0
- data/lib/less/js/test/less/errors/parens-error-2.less +3 -0
- data/lib/less/js/test/less/errors/parens-error-2.txt +4 -0
- data/lib/less/js/test/less/errors/parens-error-3.less +3 -0
- data/lib/less/js/test/less/errors/parens-error-3.txt +4 -0
- data/lib/less/js/test/less/errors/parse-error-curly-bracket.less +4 -0
- data/lib/less/js/test/less/errors/parse-error-curly-bracket.txt +4 -0
- data/lib/less/js/test/less/errors/parse-error-extra-parens.less +5 -0
- data/lib/less/js/test/less/errors/parse-error-extra-parens.txt +3 -0
- data/lib/less/js/test/less/errors/parse-error-missing-bracket.less +2 -0
- data/lib/less/js/test/less/errors/parse-error-missing-bracket.txt +3 -0
- data/lib/less/js/test/less/errors/parse-error-missing-parens.less +5 -0
- data/lib/less/js/test/less/errors/parse-error-missing-parens.txt +3 -0
- data/lib/less/js/test/less/errors/parse-error-with-import.less +13 -0
- data/lib/less/js/test/less/errors/parse-error-with-import.txt +4 -0
- data/lib/less/js/test/less/errors/percentage-missing-space.less +3 -0
- data/lib/less/js/test/less/errors/percentage-missing-space.txt +4 -0
- data/lib/less/js/test/less/errors/property-asterisk-only-name.less +3 -0
- data/lib/less/js/test/less/errors/property-asterisk-only-name.txt +4 -0
- data/lib/less/js/test/less/errors/property-ie5-hack.less +3 -0
- data/lib/less/js/test/less/errors/property-ie5-hack.txt +4 -0
- data/lib/less/js/test/less/errors/property-in-root.less +4 -0
- data/lib/less/js/test/less/errors/property-in-root.txt +4 -0
- data/lib/less/js/test/less/errors/property-in-root2.less +1 -0
- data/lib/less/js/test/less/errors/property-in-root2.txt +4 -0
- data/lib/less/js/test/less/errors/property-in-root3.less +4 -0
- data/lib/less/js/test/less/errors/property-in-root3.txt +3 -0
- data/lib/less/js/test/less/errors/property-interp-not-defined.less +1 -0
- data/lib/less/js/test/less/errors/property-interp-not-defined.txt +2 -0
- data/lib/less/js/test/less/errors/recursive-variable.less +1 -0
- data/lib/less/js/test/less/errors/recursive-variable.txt +2 -0
- data/lib/less/js/test/less/errors/svg-gradient1.less +3 -0
- data/lib/less/js/test/less/errors/svg-gradient1.txt +4 -0
- data/lib/less/js/test/less/errors/svg-gradient2.less +3 -0
- data/lib/less/js/test/less/errors/svg-gradient2.txt +4 -0
- data/lib/less/js/test/less/errors/svg-gradient3.less +3 -0
- data/lib/less/js/test/less/errors/svg-gradient3.txt +4 -0
- data/lib/less/js/test/less/errors/unit-function.less +3 -0
- data/lib/less/js/test/less/errors/unit-function.txt +4 -0
- data/lib/less/js/test/less/extend-chaining.less +91 -0
- data/lib/less/js/test/less/extend-clearfix.less +19 -0
- data/lib/less/js/test/less/extend-exact.less +46 -0
- data/lib/less/js/test/less/extend-media.less +24 -0
- data/lib/less/js/test/less/extend-nest.less +65 -0
- data/lib/less/js/test/less/extend-selector.less +99 -0
- data/lib/less/js/test/less/extend.less +81 -0
- data/lib/less/js/test/less/extract-and-length.less +133 -0
- data/lib/less/js/test/less/functions.less +130 -6
- data/lib/less/js/test/less/globalVars/extended.json +5 -0
- data/lib/less/js/test/less/globalVars/extended.less +10 -0
- data/lib/less/js/test/less/globalVars/simple.json +3 -0
- data/lib/less/js/test/less/globalVars/simple.less +3 -0
- data/lib/less/js/test/less/ie-filters.less +7 -0
- data/lib/less/js/test/less/import/deeper/import-once-test-a.less +1 -0
- data/lib/less/js/test/less/import/import-and-relative-paths-test.less +17 -0
- data/lib/less/js/test/less/import/import-charset-test.less +1 -0
- data/lib/less/js/test/less/import/import-interpolation.less +1 -0
- data/lib/less/js/test/less/import/import-interpolation2.less +5 -0
- data/lib/less/js/test/less/import/import-once-test-c.less +6 -0
- data/lib/less/js/test/less/import/import-reference.less +51 -0
- data/lib/less/js/test/less/import/import-test-a.less +1 -0
- data/lib/less/js/test/less/import/import-test-c.less +0 -1
- data/lib/less/js/test/less/import/import-test-f.less +5 -0
- data/lib/less/js/test/less/import/imports/font.less +8 -0
- data/lib/less/js/test/less/import/imports/logo.less +5 -0
- data/lib/less/js/test/less/import/invalid-css.less +1 -0
- data/lib/less/js/test/less/import/urls.less +1 -0
- data/lib/less/js/test/less/import-inline.less +2 -0
- data/lib/less/js/test/less/import-interpolation.less +8 -0
- data/lib/less/js/test/less/import-once.less +6 -0
- data/lib/less/js/test/less/import-reference.less +21 -0
- data/lib/less/js/test/less/import.less +13 -3
- data/lib/less/js/test/less/javascript.less +5 -3
- data/lib/less/js/test/less/legacy/legacy.less +7 -0
- data/lib/less/js/test/less/media.less +158 -3
- data/lib/less/js/test/less/merge.less +78 -0
- data/lib/less/js/test/less/mixins-args.less +93 -15
- data/lib/less/js/test/less/mixins-guards-default-func.less +195 -0
- data/lib/less/js/test/less/mixins-guards.less +65 -0
- data/lib/less/js/test/less/mixins-important.less +8 -1
- data/lib/less/js/test/less/mixins-interpolated.less +69 -0
- data/lib/less/js/test/less/mixins-named-args.less +36 -0
- data/lib/less/js/test/less/mixins-nested.less +2 -2
- data/lib/less/js/test/less/mixins-pattern.less +4 -1
- data/lib/less/js/test/less/mixins.less +74 -0
- data/lib/less/js/test/less/modifyVars/extended.json +5 -0
- data/lib/less/js/test/less/modifyVars/extended.less +11 -0
- data/lib/less/js/test/less/no-js-errors/no-js-errors.less +3 -0
- data/lib/less/js/test/less/no-js-errors/no-js-errors.txt +4 -0
- data/lib/less/js/test/less/no-output.less +2 -0
- data/lib/less/js/test/less/operations.less +27 -27
- data/lib/less/js/test/less/parens.less +24 -5
- data/lib/less/js/test/less/property-name-interp.less +53 -0
- data/lib/less/js/test/less/scope.less +73 -1
- data/lib/less/js/test/less/selectors.less +101 -0
- data/lib/less/js/test/less/sourcemaps/basic.json +3 -0
- data/lib/less/js/test/less/sourcemaps/basic.less +27 -0
- data/lib/less/js/test/less/sourcemaps/imported.css +7 -0
- data/lib/less/js/test/less/static-urls/urls.less +33 -0
- data/lib/less/js/test/less/strings.less +7 -1
- data/lib/less/js/test/less/url-args/urls.less +63 -0
- data/lib/less/js/test/less/urls.less +72 -0
- data/lib/less/js/test/less/variables-in-at-rules.less +20 -0
- data/lib/less/js/test/less/variables.less +42 -13
- data/lib/less/js/test/less/whitespace.less +7 -0
- data/lib/less/js/test/less-test.js +251 -65
- data/lib/less/js/test/rhino/test-header.js +15 -0
- data/lib/less/js/test/sourcemaps/basic.json +1 -0
- data/lib/less/js/test/sourcemaps/index.html +17 -0
- data/lib/less/loader.rb +191 -27
- data/lib/less/parser.rb +47 -8
- data/lib/less/version.rb +2 -2
- data/spec/less/loader_spec.rb +45 -0
- data/spec/less/parser_spec.rb +43 -17
- data/spec/less/some/some.css +0 -0
- data/spec/less/some/some.less +4 -0
- metadata +352 -57
- data/lib/less/js/CHANGELOG +0 -41
- data/lib/less/js/Makefile +0 -75
- data/lib/less/js/build/ecma-5.js +0 -120
- data/lib/less/js/build/header.js +0 -7
- data/lib/less/js/lib/less/cssmin.js +0 -355
@@ -0,0 +1,299 @@
|
|
1
|
+
# 1.7.0
|
2
|
+
|
3
|
+
2014-02-27
|
4
|
+
|
5
|
+
- Add support for rulesets in variables and passed to mixins to allow wrapping
|
6
|
+
- Change luma to follow the w3c spec, luma is available as luminance. Contrast still uses luma so you may see differences if your threshold % is close to the existing calculated luma.
|
7
|
+
- Upgraded clean css which means the --selectors-merge-mode is now renamed --compatibility
|
8
|
+
- Add support for using variables with @keyframes, @namespace, @charset
|
9
|
+
- Support property merging with +_ when spaces are needed and keep + for comma separated
|
10
|
+
- Imports now always import once consistently - a race condition meant previously certain configurations would lead to a different ordering of files
|
11
|
+
- Fix support for `.mixin(@args...)` when called with no args (e.g. `.mixin();`)
|
12
|
+
- Do unit conversions with min and max functions. Don't pass through if not understood, throw an error
|
13
|
+
- Allow % to be passed on its own to the unit function e.g. `unit(10, %)`
|
14
|
+
- Fix a bug when comparing a unit value to a non-unit value if the unit-value was the multiple of another unit (e.g. cm, mm, deg etc.)
|
15
|
+
- Fix mixins with media queries in import reference files not being put into the output (they now output, they used to incorrectly not)
|
16
|
+
- Fix lint mode - now reports all errors
|
17
|
+
- Fixed a small scope issue with & {} selector rulesets incorrectly making mixins visible - regression from 1.6.2
|
18
|
+
- Browser - added log level "debug" at 3 to get less logging, The default has changed so unless you set the value to the default you won't see a difference
|
19
|
+
- Browser - logLevel takes effect regardless of the environment (production/dev)
|
20
|
+
- Browser - added postProcessor option, a function called to post-process the css before adding to the page
|
21
|
+
- Browser - use the right request for file access in IE
|
22
|
+
|
23
|
+
# 1.6.3
|
24
|
+
|
25
|
+
2014-02-08
|
26
|
+
|
27
|
+
- Fix issue with calling toCSS twice not working in some situations (like with bootstrap 2)
|
28
|
+
|
29
|
+
# 1.6.2
|
30
|
+
|
31
|
+
2014-02-02
|
32
|
+
|
33
|
+
- The Rhino release is fixed!
|
34
|
+
- ability to use uppercase colours
|
35
|
+
- Fix a nasty bug causing syntax errors when selector interpolation is preceded by a long comment (and some other cases)
|
36
|
+
- Fix a major bug with the variable scope in guards on selectors (e.g. not mixins)
|
37
|
+
- Fold in `& when () {` to the current selector rather than duplicating it
|
38
|
+
- fix another issue with array prototypes
|
39
|
+
- add a url-args option which adds a value to all urls (for cache busting)
|
40
|
+
- Round numbers to 8 decimal places - thereby stopping javascript precision errors
|
41
|
+
- some improvements to the default() function in more complex scenarios
|
42
|
+
- improved missing '{' and '(' detection
|
43
|
+
|
44
|
+
# 1.6.1
|
45
|
+
|
46
|
+
2014-01-12
|
47
|
+
|
48
|
+
- support ^ and ^^ shadow dom selectors
|
49
|
+
- fix sourcemap selector (used to report end of the element or selector) and directive position (previously not supported)
|
50
|
+
- fix parsing empty less files
|
51
|
+
- error on (currently) ambiguous guards on multiple css selectors
|
52
|
+
- older environments - protect against typeof regex returning function
|
53
|
+
- Do not use default keyword
|
54
|
+
- use innerHTML in tests, not innerText
|
55
|
+
- protect for-in in case Array and Object prototypes have custom fields
|
56
|
+
|
57
|
+
# 1.6.0
|
58
|
+
|
59
|
+
2014-01-01
|
60
|
+
|
61
|
+
- Properties can be interpolated, e.g. @{prefix}-property: value;
|
62
|
+
- a default function has been added only valid in mixin definitions to determine if no other mixins have been matched
|
63
|
+
- Added a plugins option that allows specifying an array of visitors run on the less AST
|
64
|
+
- Performance improvements that may result in approx 20-40% speed up
|
65
|
+
- Javascript evaluations returning numbers can now be used in calculations/functions
|
66
|
+
- fixed issue when adding colours, taking the alpha over 1 and breaking when used in colour functions
|
67
|
+
- when adding together 2 colours with non zero alpha, the alpha will now be combined rather than added
|
68
|
+
- the advanced colour functions no longer ignore transparency, they blend that too
|
69
|
+
- Added --clean-option and cleancssOptions to allow passing in clean css options
|
70
|
+
- rgba declarations are now always clamped e.g. rgba(-1,258,258, -1) becomes rgba(0, 255, 255, 0)
|
71
|
+
- Fix possible issue with import reference not bringing in styles (may not be a bugfix, just a code tidy)
|
72
|
+
- Fix some issues with urls() being prefixed twice and unquoted urls in mixins being processed each time they are called
|
73
|
+
- Fixed error messages for undefined variables in javascript evaluation
|
74
|
+
- Fixed line/column numbers from math errors
|
75
|
+
|
76
|
+
# 1.5.1
|
77
|
+
|
78
|
+
2013-11-17
|
79
|
+
|
80
|
+
- Added source-map-URL option
|
81
|
+
- Fixed a bug which meant the minimised 1.5.0 browser version was not wrapped, meaning it interfered with require js
|
82
|
+
- Fixed a bug where the browser version assume port was specified
|
83
|
+
- Added the ability to specify variables on the command line
|
84
|
+
- Upgraded clean-css and fixed it from trying to import
|
85
|
+
- correct a bug meaning imports weren't synchronous (syncImport option available for full synchronous behaviour)
|
86
|
+
- better mixin matching behaviour with calling multiple classes e.g. .a.b.c;
|
87
|
+
|
88
|
+
# 1.5.0
|
89
|
+
|
90
|
+
2013-10-21
|
91
|
+
|
92
|
+
- sourcemap support
|
93
|
+
- support for import inline option to include css that you do NOT want less to parse e.g. `@import (inline) "file.css";`
|
94
|
+
- better support for modifyVars (refresh styles with new variables, using a file cache), is now more resiliant
|
95
|
+
- support for import reference option to reference external css, but not output it. Any mixin calls or extend's will be output.
|
96
|
+
- support for guards on selectors (currently only if you have a single selector)
|
97
|
+
- allow property merging through the +: syntax
|
98
|
+
- Added min/max functions
|
99
|
+
- Added length function and improved extract to work with comma seperated values
|
100
|
+
- when using import multiple, sub imports are imported multiple times into final output
|
101
|
+
- fix bad spaces between namespace operators
|
102
|
+
- do not compress comment if it begins with an exclamation mark
|
103
|
+
- Fix the saturate function to pass through when using the CSS syntax
|
104
|
+
- Added svg-gradient function
|
105
|
+
- Added no-js option to lessc (in browser, use javascriptEnabled: false) which disallows JavaScript in less files
|
106
|
+
- switched from the little supported and buggy cssmin (previously ycssmin) to clean-css
|
107
|
+
- support transparent as a color, but not convert between rgba(0, 0, 0, 0) and transparent
|
108
|
+
- remove sys.puts calls to stop deprecation warnings in future node.js releases
|
109
|
+
- Browser: added logLevel option to control logging (2 = everything, 1 = errors only, 0 = no logging)
|
110
|
+
- Browser: added errorReporting option which can be "html" (default) or "console" or a function
|
111
|
+
- Now uses grunt for building and testing
|
112
|
+
- A few bug fixes for media queries, extends, scoping, compression and import once.
|
113
|
+
|
114
|
+
# 1.4.2
|
115
|
+
|
116
|
+
2013-07-20
|
117
|
+
|
118
|
+
- if you don't pass a strict maths option, font size/line height options are output correctly again
|
119
|
+
- npmignore now include .gitattributes
|
120
|
+
- property names may include capital letters
|
121
|
+
- various windows path fixes (capital letters, multiple // in a path)
|
122
|
+
|
123
|
+
# 1.4.1
|
124
|
+
|
125
|
+
2013-07-05
|
126
|
+
|
127
|
+
- fix syncImports and yui-compress option, as they were being ignored
|
128
|
+
- fixed several global variable leaks
|
129
|
+
- handle getting null or undefined passed as the options object
|
130
|
+
|
131
|
+
# 1.4.0
|
132
|
+
|
133
|
+
2013-06-05
|
134
|
+
|
135
|
+
- fix passing of strict maths option
|
136
|
+
|
137
|
+
# 1.4.0 Beta 4
|
138
|
+
|
139
|
+
2013-05-04
|
140
|
+
|
141
|
+
- change strictMaths to strictMath. Enable this with --strict-math=on in lessc and strictMath:true in JavaScript.
|
142
|
+
- change lessc option for strict units to --strict-units=off
|
143
|
+
|
144
|
+
# 1.4.0 Beta 3
|
145
|
+
|
146
|
+
2013-04-30
|
147
|
+
|
148
|
+
- strictUnits now defaults to false and the true case now gives more useful but less correct results, e.g. 2px/1px = 2px
|
149
|
+
- Process ./ when having relative paths
|
150
|
+
- add isunit function for mixin guards and non basic units
|
151
|
+
- extends recognise attributes
|
152
|
+
- exception errors extend the JavaScript Error
|
153
|
+
- remove es-5-shim as standard from the browser
|
154
|
+
- Fix path issues with windows/linux local paths
|
155
|
+
|
156
|
+
# 1.4.0 Beta 1 & 2
|
157
|
+
|
158
|
+
2013-03-07
|
159
|
+
|
160
|
+
- support for `:extend()` in selectors (e.g. `input:extend(.button) {}`) and `&:extend();` in ruleset (e.g. `input { &:extend(.button all); }`)
|
161
|
+
- maths is now only done inside brackets. This means font: statements, media queries and the calc function can use a simpler format without being escaped. Disable this with --strict-maths-off in lessc and strictMaths:false in JavaScript.
|
162
|
+
- units are calculated, e.g. 200cm+1m = 3m, 3px/1px = 3. If you use units inconsistently you will get an error. Suppress this error with --strict-units-off in lessc or strictUnits:false in JavaScript
|
163
|
+
- `(~"@var")` selector interpolation is removed. Use @{var} in selectors to have variable selectors
|
164
|
+
- default behaviour of import is to import each file once. `@import-once` has been removed.
|
165
|
+
- You can specify options on imports to force it to behave as css or less `@import (less) "file.css"` will process the file as less
|
166
|
+
- variables in mixins no longer 'leak' into their calling scope
|
167
|
+
- added data-uri function which will inline an image into the output css. If ieCompat option is true and file is too large, it will fallback to a url()
|
168
|
+
- significant bug fixes to our debug options
|
169
|
+
- other parameters can be used as defaults in mixins e.g. .a(@a, @b:@a)
|
170
|
+
- an error is shown if properties are used outside of a ruleset
|
171
|
+
- added extract function which picks a value out of a list, e.g. extract(12 13 14, 3) => 14
|
172
|
+
- added luma, hsvhue, hsvsaturation, hsvvalue functions
|
173
|
+
- added pow, pi, mod, tan, sin, cos, atan, asin, acos and sqrt math functions
|
174
|
+
- added convert function, e.g. convert(1rad, deg) => value in degrees
|
175
|
+
- lessc makes output directories if they don't exist
|
176
|
+
- lessc `@import` supports https and 301's
|
177
|
+
- lessc "-depends" option for lessc writes out the list of import files used in makefile format
|
178
|
+
- lessc "-lint" option just reports errors
|
179
|
+
- support for namespaces in attributes and selector interpolation in attributes
|
180
|
+
- other bug fixes
|
181
|
+
|
182
|
+
# 1.3.3
|
183
|
+
|
184
|
+
2012-12-30
|
185
|
+
|
186
|
+
- Fix critical bug with mixin call if using multiple brackets
|
187
|
+
- when using the filter contrast function, the function is passed through if the first argument is not a color
|
188
|
+
|
189
|
+
# 1.3.2
|
190
|
+
|
191
|
+
2012-12-28
|
192
|
+
|
193
|
+
- browser and server url re-writing is now aligned to not re-write (previous lessc behaviour)
|
194
|
+
- url-rewriting can be made to re-write to be relative to the entry file using the relative-urls option (less.relativeUrls option)
|
195
|
+
- rootpath option can be used to add a base path to every url
|
196
|
+
- Support mixin argument seperator of ';' so you can pass comma seperated values. e.g. `.mixin(23px, 12px;);`
|
197
|
+
- Fix lots of problems with named arguments in corner cases, not behaving as expected
|
198
|
+
- hsv, hsva, unit functions
|
199
|
+
- fixed lots more bad error messages
|
200
|
+
- fix `@import-once` to use the full path, not the relative one for determining if an import has been imported already
|
201
|
+
- support `:not(:nth-child(3))`
|
202
|
+
- mixin guards take units into account
|
203
|
+
- support unicode descriptors (`U+00A1-00A9`)
|
204
|
+
- support calling mixins with a stack when using `&` (broken in 1.3.1)
|
205
|
+
- support `@namespace` and namespace combinators
|
206
|
+
- when using % with colour functions, take into account a colour is out of 256
|
207
|
+
- when doing maths with a % do not divide by 100 and keep the unit
|
208
|
+
- allow url to contain % (e.g. %20 for a space)
|
209
|
+
- if a mixin guard stops execution a default mixin is not required
|
210
|
+
- units are output in strings (use the unit function if you need to get the value without unit)
|
211
|
+
- do not infinite recurse when mixins call mixins of the same name
|
212
|
+
- fix issue on important on mixin calls
|
213
|
+
- fix issue with multiple comments being confused
|
214
|
+
- tolerate multiple semi-colons on rules
|
215
|
+
- ignore subsequant `@charset`
|
216
|
+
- syncImport option for node.js to read files syncronously
|
217
|
+
- write the output directory if it is missing
|
218
|
+
- change dependency on cssmin to ycssmin
|
219
|
+
- lessc can load files over http
|
220
|
+
- allow calling less.watch() in non dev mode
|
221
|
+
- don't cache in dev mode
|
222
|
+
- less files cope with query parameters better
|
223
|
+
- sass debug statements are now chrome compatible
|
224
|
+
- modifyVars function added to re-render with different root variables
|
225
|
+
|
226
|
+
# 1.3.1
|
227
|
+
|
228
|
+
2012-10-18
|
229
|
+
|
230
|
+
- Support for comment and @media debugging statements
|
231
|
+
- bug fix for async access in chrome extensions
|
232
|
+
- new functions tint, shade, multiply, screen, overlay, hardlight, difference, exclusion, average, negation, softlight, red, green, blue, contrast
|
233
|
+
- allow escaped characters in attributes
|
234
|
+
- in selectors support @{a} directly, e.g. .a.@{a} { color: black; }
|
235
|
+
- add fraction parameter to round function
|
236
|
+
- much better support for & selector
|
237
|
+
- preserve order of link statements client side
|
238
|
+
- lessc has better help
|
239
|
+
- rhino version fixed
|
240
|
+
- fix bugs in clientside error handling
|
241
|
+
- support dpi, vmin, vm, dppx, dpcm units
|
242
|
+
- Fix ratios in media statements
|
243
|
+
- in mixin guards allow comparing colors and strings
|
244
|
+
- support for -*-keyframes (for -khtml but now supports any)
|
245
|
+
- in mix function, default weight to 50%
|
246
|
+
- support @import-once
|
247
|
+
- remove duplicate rules in output
|
248
|
+
- implement named parameters when calling mixins
|
249
|
+
- many numerous bug fixes
|
250
|
+
|
251
|
+
# 1.3.0
|
252
|
+
|
253
|
+
2012-03-10
|
254
|
+
|
255
|
+
- @media bubbling
|
256
|
+
- Support arbitrary entities as selectors
|
257
|
+
- [Variadic argument support](https://gist.github.com/1933613)
|
258
|
+
- Behaviour of zero-arity mixins has [changed](https://gist.github.com/1933613)
|
259
|
+
- Allow `@import` directives in any selector
|
260
|
+
- Media-query features can now be a variable
|
261
|
+
- Automatic merging of media-query conditions
|
262
|
+
- Fix global variable leaks
|
263
|
+
- Fix error message on wrong-arity call
|
264
|
+
- Fix an `@arguments` behaviour bug
|
265
|
+
- Fix `::` selector output
|
266
|
+
- Fix a bug when using @media with mixins
|
267
|
+
|
268
|
+
|
269
|
+
# 1.2.1
|
270
|
+
|
271
|
+
2012-01-15
|
272
|
+
|
273
|
+
- Fix imports in browser
|
274
|
+
- Improve error reporting in browser
|
275
|
+
- Fix Runtime error reports from imported files
|
276
|
+
- Fix `File not found` import error reporting
|
277
|
+
|
278
|
+
|
279
|
+
# 1.2.0
|
280
|
+
|
281
|
+
2012-01-07
|
282
|
+
|
283
|
+
- Mixin guards
|
284
|
+
- New function `percentage`
|
285
|
+
- New `color` function to parse hex color strings
|
286
|
+
- New type-checking stylesheet functions
|
287
|
+
- Fix Rhino support
|
288
|
+
- Fix bug in string arguments to mixin call
|
289
|
+
- Fix error reporting when index is 0
|
290
|
+
- Fix browser support in WebKit and IE
|
291
|
+
- Fix string interpolation bug when var is empty
|
292
|
+
- Support `!important` after mixin calls
|
293
|
+
- Support vanilla @keyframes directive
|
294
|
+
- Support variables in certain css selectors, like `nth-child`
|
295
|
+
- Support @media and @import features properly
|
296
|
+
- Improve @import support with media features
|
297
|
+
- Improve error reports from imported files
|
298
|
+
- Improve function call error reporting
|
299
|
+
- Improve error-reporting
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Contributing to Less.js
|
2
|
+
|
3
|
+
> We welcome feature requests and bug reports. Please read these guidelines before submitting one.
|
4
|
+
|
5
|
+
|
6
|
+
<span class="warning">**Words that begin with the at sign (`@`) must be wrapped in backticks!** </span>. As a courtesy to avoid sending notifications to any user that might have the `@username` being referenced, please remember that GitHub usernames also start with the at sign. If you don't wrap them in backticks, users will get unintended notifications from you.
|
7
|
+
|
8
|
+
GitHub has other great markdown features as well, [go here to learn more about them](https://help.github.com/articles/github-flavored-markdown).
|
9
|
+
|
10
|
+
|
11
|
+
## Reporting Issues
|
12
|
+
|
13
|
+
We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems that we can fix within the Less.js core. Please read the following guidelines before opening any issue.
|
14
|
+
|
15
|
+
1. **Search for existing issues.** We get a lot of duplicate issues, and you'd help us out a lot by first checking if someone else has reported the same issue. Moreover, the issue may have already been resolved with a fix available.
|
16
|
+
2. **Create an isolated and reproducible test case.** Be sure the problem exists in Less.js's code with [reduced test cases](http://css-tricks.com/reduced-test-cases/) that should be included in each bug report.
|
17
|
+
3. **Test with the latest version**. We get a lot of issues that could be resolved by updating your version of Less.js.
|
18
|
+
3. **Include a live example.** Please use [less2css.org](http://less2css.org/) for sharing your isolated test cases.
|
19
|
+
4. **Share as much information as possible.** Include operating system and version. Describe how you use Less. If you use it in the browser, please include browser and version, and the version of Less.js you're using. Let us know if you're using the command line (`lessc`) or an external tool. And try to include steps to reproduce the bug.
|
20
|
+
5. If you have a solution or suggestion for how to fix the bug you're reporting, please include it, or make a pull request - don't assume the maintainers know how to fix it just because you do.
|
21
|
+
|
22
|
+
Please report documentation issues in [the documentation project](https://github.com/less/less-docs).
|
23
|
+
|
24
|
+
## Feature Requests
|
25
|
+
|
26
|
+
* Please search for existing feature requests first to see if something similar already exists.
|
27
|
+
* Include a clear and specific use-case. We love new ideas, but we do not add language features without a reason.
|
28
|
+
* Consider whether or not your language feature would be better as a function or implemented in a 3rd-party build system such as [assemble-less](http://github.com/assemble/assemble-less).
|
29
|
+
|
30
|
+
|
31
|
+
## Pull Requests
|
32
|
+
|
33
|
+
_Pull requests are encouraged!_
|
34
|
+
|
35
|
+
* Start by adding a feature request to get feedback and see how your idea is received.
|
36
|
+
* If your pull request solves an existing issue, but it's different in some way, _please create a new issue_ and make sure to discuss it with the core contributors. Otherwise you risk your hard work being rejected.
|
37
|
+
* Do not change the **./dist/** folder, we do this when releasing
|
38
|
+
* _Please add tests_ for your work. Tests are invoked using `grunt test` command. It will run both node.js tests and browser ([PhantomJS](http://phantomjs.org/)) tests.
|
39
|
+
|
40
|
+
### Coding Standards
|
41
|
+
|
42
|
+
* Always use spaces, never tabs
|
43
|
+
* End lines in semi-colons.
|
44
|
+
* Loosely aim towards jsHint standards
|
45
|
+
|
46
|
+
|
47
|
+
## Developing
|
48
|
+
If you want to take an issue just add a small comment saying you are having a go at something, so we don't get duplication.
|
49
|
+
|
50
|
+
Learn more about [developing Less.js](http://lesscss.org/usage/#developing-less).
|
@@ -0,0 +1,298 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
module.exports = function(grunt) {
|
4
|
+
|
5
|
+
// Report the elapsed execution time of tasks.
|
6
|
+
require('time-grunt')(grunt);
|
7
|
+
|
8
|
+
// Project configuration.
|
9
|
+
grunt.initConfig({
|
10
|
+
|
11
|
+
// Metadata required for build.
|
12
|
+
build: grunt.file.readYAML('build/build.yml'),
|
13
|
+
pkg: grunt.file.readJSON('package.json'),
|
14
|
+
meta: {
|
15
|
+
license: '<%= _.pluck(pkg.licenses, "type").join(", ") %>',
|
16
|
+
copyright: 'Copyright (c) 2009-<%= grunt.template.today("yyyy") %>',
|
17
|
+
banner:
|
18
|
+
'/*! \n' +
|
19
|
+
' * LESS - <%= pkg.description %> v<%= pkg.version %> \n' +
|
20
|
+
' * http://lesscss.org \n' +
|
21
|
+
' * \n' +
|
22
|
+
' * <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> \n' +
|
23
|
+
' * Licensed under the <%= meta.license %> License. \n' +
|
24
|
+
' * \n' +
|
25
|
+
' */ \n\n' +
|
26
|
+
' /**' +
|
27
|
+
' * @license <%= meta.license %>\n' +
|
28
|
+
' */ \n\n'
|
29
|
+
},
|
30
|
+
|
31
|
+
shell: {
|
32
|
+
options: {stdout: true, failOnError: true},
|
33
|
+
test: {
|
34
|
+
command: 'node test'
|
35
|
+
},
|
36
|
+
benchmark: {
|
37
|
+
command: 'node benchmark/less-benchmark.js'
|
38
|
+
},
|
39
|
+
"browsertest-server": {
|
40
|
+
command: 'node node_modules/http-server/bin/http-server . -p 8088'
|
41
|
+
},
|
42
|
+
"sourcemap-test": {
|
43
|
+
command: [
|
44
|
+
'node bin/lessc --source-map --source-map-map-inline test/less/import.less test/sourcemaps/import.css',
|
45
|
+
'node bin/lessc --source-map --source-map-map-inline test/less/sourcemaps/basic.less test/sourcemaps/basic.css',
|
46
|
+
'node node_modules/http-server/bin/http-server test/sourcemaps -p 8084'].join('&&')
|
47
|
+
}
|
48
|
+
},
|
49
|
+
concat: {
|
50
|
+
options: {
|
51
|
+
stripBanners: 'all',
|
52
|
+
banner: '<%= meta.banner %>\n\n(function (window, undefined) {',
|
53
|
+
footer: '\n})(window);'
|
54
|
+
},
|
55
|
+
// Browser versions
|
56
|
+
browsertest: {
|
57
|
+
src: ['<%= build.browser %>'],
|
58
|
+
dest: 'test/browser/less.js'
|
59
|
+
},
|
60
|
+
stable: {
|
61
|
+
src: ['<%= build.browser %>'],
|
62
|
+
dest: 'dist/less-<%= pkg.version %>.js'
|
63
|
+
},
|
64
|
+
// Rhino
|
65
|
+
rhino: {
|
66
|
+
options: {
|
67
|
+
banner: '/* LESS.js v<%= pkg.version %> RHINO | <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> */\n\n',
|
68
|
+
footer: '' // override task-level footer
|
69
|
+
},
|
70
|
+
src: ['<%= build.rhino %>'],
|
71
|
+
dest: 'dist/less-rhino-<%= pkg.version %>.js'
|
72
|
+
},
|
73
|
+
// lessc for Rhino
|
74
|
+
rhinolessc: {
|
75
|
+
options: {
|
76
|
+
banner: '/* LESS.js v<%= pkg.version %> RHINO | <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> */\n\n',
|
77
|
+
footer: '' // override task-level footer
|
78
|
+
},
|
79
|
+
src: ['<%= build.rhinolessc %>'],
|
80
|
+
dest: 'dist/lessc-rhino-<%= pkg.version %>.js'
|
81
|
+
},
|
82
|
+
// Generate readme
|
83
|
+
readme: {
|
84
|
+
// override task-level banner and footer
|
85
|
+
options: {process: true, banner: '', footer: ''},
|
86
|
+
src: ['build/README.md'],
|
87
|
+
dest: 'README.md'
|
88
|
+
}
|
89
|
+
},
|
90
|
+
|
91
|
+
uglify: {
|
92
|
+
options: {
|
93
|
+
banner: '<%= meta.banner %>',
|
94
|
+
mangle: true
|
95
|
+
},
|
96
|
+
stable: {
|
97
|
+
src: ['<%= concat.stable.dest %>'],
|
98
|
+
dest: 'dist/less-<%= pkg.version %>.min.js'
|
99
|
+
}
|
100
|
+
},
|
101
|
+
|
102
|
+
jshint: {
|
103
|
+
options: {jshintrc: '.jshintrc'},
|
104
|
+
files: {
|
105
|
+
src: [
|
106
|
+
'Gruntfile.js',
|
107
|
+
'lib/less/**/*.js'
|
108
|
+
]
|
109
|
+
}
|
110
|
+
},
|
111
|
+
|
112
|
+
connect: {
|
113
|
+
server: {
|
114
|
+
options: {
|
115
|
+
port: 8081
|
116
|
+
}
|
117
|
+
}
|
118
|
+
},
|
119
|
+
|
120
|
+
jasmine: {
|
121
|
+
options: {
|
122
|
+
// version: '2.0.0-rc2',
|
123
|
+
keepRunner: true,
|
124
|
+
host: 'http://localhost:8081/',
|
125
|
+
vendor: ['test/browser/common.js', 'test/browser/less.js'],
|
126
|
+
template: 'test/browser/test-runner-template.tmpl'
|
127
|
+
},
|
128
|
+
main: {
|
129
|
+
// src is used to build list of less files to compile
|
130
|
+
src: ['test/less/*.less', '!test/less/javascript.less', '!test/less/urls.less', '!test/less/empty.less'],
|
131
|
+
options: {
|
132
|
+
helpers: 'test/browser/runner-main-options.js',
|
133
|
+
specs: 'test/browser/runner-main-spec.js',
|
134
|
+
outfile: 'tmp/browser/test-runner-main.html'
|
135
|
+
}
|
136
|
+
},
|
137
|
+
legacy: {
|
138
|
+
src: ['test/less/legacy/*.less'],
|
139
|
+
options: {
|
140
|
+
helpers: 'test/browser/runner-legacy-options.js',
|
141
|
+
specs: 'test/browser/runner-legacy-spec.js',
|
142
|
+
outfile: 'tmp/browser/test-runner-legacy.html'
|
143
|
+
}
|
144
|
+
},
|
145
|
+
errors: {
|
146
|
+
src: ['test/less/errors/*.less', '!test/less/errors/javascript-error.less'],
|
147
|
+
options: {
|
148
|
+
timeout: 20000,
|
149
|
+
helpers: 'test/browser/runner-errors-options.js',
|
150
|
+
specs: 'test/browser/runner-errors-spec.js',
|
151
|
+
outfile: 'tmp/browser/test-runner-errors.html'
|
152
|
+
}
|
153
|
+
},
|
154
|
+
noJsErrors: {
|
155
|
+
src: ['test/less/no-js-errors/*.less'],
|
156
|
+
options: {
|
157
|
+
helpers: 'test/browser/runner-no-js-errors-options.js',
|
158
|
+
specs: 'test/browser/runner-no-js-errors-spec.js',
|
159
|
+
outfile: 'tmp/browser/test-runner-no-js-errors.html'
|
160
|
+
}
|
161
|
+
},
|
162
|
+
browser: {
|
163
|
+
src: ['test/browser/less/*.less'],
|
164
|
+
options: {
|
165
|
+
helpers: 'test/browser/runner-browser-options.js',
|
166
|
+
specs: 'test/browser/runner-browser-spec.js',
|
167
|
+
outfile: 'tmp/browser/test-runner-browser.html'
|
168
|
+
}
|
169
|
+
},
|
170
|
+
relativeUrls: {
|
171
|
+
src: ['test/browser/less/relative-urls/*.less'],
|
172
|
+
options: {
|
173
|
+
helpers: 'test/browser/runner-relative-urls-options.js',
|
174
|
+
specs: 'test/browser/runner-relative-urls-spec.js',
|
175
|
+
outfile: 'tmp/browser/test-runner-relative-urls.html'
|
176
|
+
}
|
177
|
+
},
|
178
|
+
rootpath: {
|
179
|
+
src: ['test/browser/less/rootpath/*.less'],
|
180
|
+
options: {
|
181
|
+
helpers: 'test/browser/runner-rootpath-options.js',
|
182
|
+
specs: 'test/browser/runner-rootpath-spec.js',
|
183
|
+
outfile: 'tmp/browser/test-runner-rootpath.html'
|
184
|
+
}
|
185
|
+
},
|
186
|
+
rootpathRelative: {
|
187
|
+
src: ['test/browser/less/rootpath-relative/*.less'],
|
188
|
+
options: {
|
189
|
+
helpers: 'test/browser/runner-rootpath-relative-options.js',
|
190
|
+
specs: 'test/browser/runner-rootpath-relative-spec.js',
|
191
|
+
outfile: 'tmp/browser/test-runner-rootpath-relative.html'
|
192
|
+
}
|
193
|
+
},
|
194
|
+
production: {
|
195
|
+
src: ['test/browser/less/production/*.less'],
|
196
|
+
options: {
|
197
|
+
helpers: 'test/browser/runner-production-options.js',
|
198
|
+
specs: 'test/browser/runner-production-spec.js',
|
199
|
+
outfile: 'tmp/browser/test-runner-production.html'
|
200
|
+
}
|
201
|
+
},
|
202
|
+
modifyVars: {
|
203
|
+
src: ['test/browser/less/modify-vars/*.less'],
|
204
|
+
options: {
|
205
|
+
helpers: 'test/browser/runner-modify-vars-options.js',
|
206
|
+
specs: 'test/browser/runner-modify-vars-spec.js',
|
207
|
+
outfile: 'tmp/browser/test-runner-modify-vars.html'
|
208
|
+
}
|
209
|
+
},
|
210
|
+
globalVars: {
|
211
|
+
src: ['test/browser/less/global-vars/*.less'],
|
212
|
+
options: {
|
213
|
+
helpers: 'test/browser/runner-global-vars-options.js',
|
214
|
+
specs: 'test/browser/runner-global-vars-spec.js',
|
215
|
+
outfile: 'tmp/browser/test-runner-global-vars.html'
|
216
|
+
}
|
217
|
+
},
|
218
|
+
postProcessor: {
|
219
|
+
src: ['test/browser/less/postProcessor/*.less'],
|
220
|
+
options: {
|
221
|
+
helpers: 'test/browser/runner-postProcessor-options.js',
|
222
|
+
specs: 'test/browser/runner-postProcessor.js',
|
223
|
+
outfile: 'tmp/browser/test-postProcessor.html'
|
224
|
+
}
|
225
|
+
}
|
226
|
+
},
|
227
|
+
|
228
|
+
// Clean the version of less built for the tests
|
229
|
+
clean: {
|
230
|
+
test: ['test/browser/less.js', 'tmp'],
|
231
|
+
"sourcemap-test": ['test/sourcemaps/*.css', 'test/sourcemaps/*.map']
|
232
|
+
}
|
233
|
+
});
|
234
|
+
|
235
|
+
// Load these plugins to provide the necessary tasks
|
236
|
+
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
|
237
|
+
|
238
|
+
// Actually load this plugin's task(s).
|
239
|
+
grunt.loadTasks('build/tasks');
|
240
|
+
|
241
|
+
// by default, run tests
|
242
|
+
grunt.registerTask('default', [
|
243
|
+
'test'
|
244
|
+
]);
|
245
|
+
|
246
|
+
// Release
|
247
|
+
grunt.registerTask('stable', [
|
248
|
+
'concat:stable',
|
249
|
+
'uglify:stable'
|
250
|
+
]);
|
251
|
+
|
252
|
+
// Release Rhino Version
|
253
|
+
grunt.registerTask('rhino', [
|
254
|
+
'concat:rhino',
|
255
|
+
'concat:rhinolessc'
|
256
|
+
]);
|
257
|
+
|
258
|
+
// Run all browser tests
|
259
|
+
grunt.registerTask('browsertest', [
|
260
|
+
'browser',
|
261
|
+
'connect',
|
262
|
+
'jasmine'
|
263
|
+
]);
|
264
|
+
|
265
|
+
// setup a web server to run the browser tests in a browser rather than phantom
|
266
|
+
grunt.registerTask('browsertest-server', [
|
267
|
+
'shell:browsertest-server'
|
268
|
+
]);
|
269
|
+
|
270
|
+
// Create the browser version of less.js
|
271
|
+
grunt.registerTask('browser', [
|
272
|
+
'concat:browsertest'
|
273
|
+
]);
|
274
|
+
|
275
|
+
// Run all tests
|
276
|
+
grunt.registerTask('test', [
|
277
|
+
'clean',
|
278
|
+
'jshint',
|
279
|
+
'shell:test',
|
280
|
+
'browsertest'
|
281
|
+
]);
|
282
|
+
|
283
|
+
// generate a good test environment for testing sourcemaps
|
284
|
+
grunt.registerTask('sourcemap-test', [
|
285
|
+
'clean:sourcemap-test',
|
286
|
+
'shell:sourcemap-test'
|
287
|
+
]);
|
288
|
+
|
289
|
+
// Run benchmark
|
290
|
+
grunt.registerTask('benchmark', [
|
291
|
+
'shell:benchmark'
|
292
|
+
]);
|
293
|
+
|
294
|
+
// Readme.
|
295
|
+
grunt.registerTask('readme', [
|
296
|
+
'concat:readme'
|
297
|
+
]);
|
298
|
+
};
|