less 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +4 -0
- data/Gemfile +1 -1
- data/less.gemspec +1 -1
- data/lib/less/defaults.rb +3 -3
- data/lib/less/java_script/v8_context.rb +1 -1
- data/lib/less/js/.gitattributes +3 -2
- data/lib/less/js/.gitignore +18 -2
- data/lib/less/js/.jshintrc +11 -0
- data/lib/less/js/CHANGELOG.md +87 -2
- data/lib/less/js/CONTRIBUTING.md +4 -3
- data/lib/less/js/Gruntfile.js +290 -0
- data/lib/less/js/README.md +342 -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 +154 -12
- data/lib/less/js/bower.json +18 -0
- data/lib/less/js/build.gradle +347 -0
- data/lib/less/js/build/README.md +350 -0
- data/lib/less/js/build/browser-header.js +4 -0
- data/lib/less/js/build/build.yml +160 -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/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-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/lessc-rhino-1.6.2.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 +482 -367
- data/lib/less/js/lib/less/colors.js +0 -1
- data/lib/less/js/lib/less/encoder.js +4 -0
- data/lib/less/js/lib/less/env.js +50 -19
- data/lib/less/js/lib/less/extend-visitor.js +66 -41
- data/lib/less/js/lib/less/functions.js +309 -104
- data/lib/less/js/lib/less/import-visitor.js +21 -10
- data/lib/less/js/lib/less/index.js +90 -68
- data/lib/less/js/lib/less/join-selector-visitor.js +11 -4
- data/lib/less/js/lib/less/lessc_helper.js +56 -45
- data/lib/less/js/lib/less/parser.js +830 -460
- data/lib/less/js/lib/less/rhino.js +380 -58
- data/lib/less/js/lib/less/source-map-output.js +141 -0
- data/lib/less/js/lib/less/to-css-visitor.js +215 -0
- data/lib/less/js/lib/less/tree.js +57 -5
- data/lib/less/js/lib/less/tree/alpha.js +13 -5
- data/lib/less/js/lib/less/tree/anonymous.js +11 -5
- data/lib/less/js/lib/less/tree/assignment.js +11 -5
- data/lib/less/js/lib/less/tree/call.js +19 -8
- data/lib/less/js/lib/less/tree/color.js +59 -36
- data/lib/less/js/lib/less/tree/comment.js +17 -4
- data/lib/less/js/lib/less/tree/condition.js +3 -3
- data/lib/less/js/lib/less/tree/dimension.js +161 -153
- data/lib/less/js/lib/less/tree/directive.js +39 -18
- data/lib/less/js/lib/less/tree/element.js +41 -18
- data/lib/less/js/lib/less/tree/expression.js +11 -5
- data/lib/less/js/lib/less/tree/extend.js +11 -1
- data/lib/less/js/lib/less/tree/import.js +34 -20
- data/lib/less/js/lib/less/tree/javascript.js +16 -10
- data/lib/less/js/lib/less/tree/keyword.js +5 -2
- data/lib/less/js/lib/less/tree/media.js +39 -22
- data/lib/less/js/lib/less/tree/mixin.js +135 -56
- data/lib/less/js/lib/less/tree/negative.js +4 -2
- data/lib/less/js/lib/less/tree/operation.js +17 -12
- data/lib/less/js/lib/less/tree/paren.js +5 -2
- data/lib/less/js/lib/less/tree/quoted.js +9 -6
- data/lib/less/js/lib/less/tree/rule.js +39 -21
- data/lib/less/js/lib/less/tree/ruleset.js +229 -145
- data/lib/less/js/lib/less/tree/selector.js +101 -34
- data/lib/less/js/lib/less/tree/unicode-descriptor.js +4 -3
- data/lib/less/js/lib/less/tree/url.js +33 -11
- data/lib/less/js/lib/less/tree/value.js +13 -6
- data/lib/less/js/lib/less/tree/variable.js +13 -8
- data/lib/less/js/lib/less/visitor.js +117 -25
- 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 +30 -15
- data/lib/less/js/test/browser/common.js +131 -56
- 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/relative-urls/urls.css +8 -9
- data/lib/less/js/test/browser/css/rootpath-relative/urls.css +0 -1
- data/lib/less/js/test/browser/css/rootpath/urls.css +0 -1
- data/lib/less/js/test/browser/css/urls.css +18 -14
- data/lib/less/js/test/browser/es5.js +27 -0
- data/lib/less/js/test/{less/errors/color-operation-error.less → browser/less/console-errors/test-error.less} +0 -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/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/relative-urls/urls.less +1 -1
- data/lib/less/js/test/browser/less/rootpath-relative/urls.less +1 -1
- data/lib/less/js/test/browser/less/rootpath/urls.less +1 -1
- data/lib/less/js/test/browser/less/urls.less +9 -1
- data/lib/less/js/test/browser/phantom-runner.js +112 -103
- data/lib/less/js/test/browser/runner-browser-options.js +42 -0
- data/lib/less/js/test/browser/{runner-browser.js → runner-browser-spec.js} +7 -2
- 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.js → runner-legacy-spec.js} +1 -4
- 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-production-options.js +3 -0
- data/lib/less/js/test/browser/{runner-production.js → runner-production-spec.js} +1 -3
- data/lib/less/js/test/browser/runner-relative-urls-options.js +3 -0
- data/lib/less/js/test/browser/{runner-relative-urls.js → runner-relative-urls-spec.js} +1 -2
- 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.js → runner-rootpath-relative-spec.js} +1 -3
- data/lib/less/js/test/browser/{runner-rootpath.js → runner-rootpath-spec.js} +1 -2
- data/lib/less/js/test/browser/test-runner-template.tmpl +47 -0
- data/lib/less/js/test/css/colors.css +7 -0
- data/lib/less/js/test/css/comments.css +9 -4
- data/lib/less/js/test/css/compression/compression.css +3 -2
- data/lib/less/js/test/css/css-3.css +17 -5
- data/lib/less/js/test/css/css-guards.css +37 -0
- data/lib/less/js/test/css/debug/linenumbers-all.css +6 -0
- data/lib/less/js/test/css/debug/linenumbers-comments.css +5 -0
- data/lib/less/js/test/css/debug/linenumbers-mediaquery.css +5 -0
- data/lib/less/js/test/css/empty.css +0 -0
- data/lib/less/js/test/css/extend-chaining.css +9 -0
- data/lib/less/js/test/css/extend-selector.css +10 -2
- data/lib/less/js/test/css/extract-and-length.css +133 -0
- data/lib/less/js/test/css/functions.css +23 -10
- 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/import-inline.css +5 -0
- data/lib/less/js/test/css/import-once.css +12 -0
- data/lib/less/js/test/css/import-reference.css +49 -0
- data/lib/less/js/test/css/import.css +0 -2
- data/lib/less/js/test/css/media.css +21 -5
- data/lib/less/js/test/css/merge.css +26 -0
- data/lib/less/js/test/css/mixins-guards-default-func.css +129 -0
- data/lib/less/js/test/css/mixins-guards.css +6 -0
- data/lib/less/js/test/css/mixins-important.css +7 -0
- data/lib/less/js/test/css/mixins-interpolated.css +39 -0
- data/lib/less/js/test/css/mixins.css +20 -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 +3 -0
- data/lib/less/js/test/css/property-name-interp.css +20 -0
- data/lib/less/js/test/css/selectors.css +12 -0
- data/lib/less/js/test/css/static-urls/urls.css +7 -4
- data/lib/less/js/test/css/strings.css +3 -0
- data/lib/less/js/test/css/url-args/urls.css +56 -0
- data/lib/less/js/test/css/urls.css +21 -9
- data/lib/less/js/test/index.js +45 -0
- data/lib/less/js/test/less-test.js +234 -191
- data/lib/less/js/test/less/colors.less +6 -0
- data/lib/less/js/test/less/comments.less +7 -1
- data/lib/less/js/test/less/compression/compression.less +21 -1
- data/lib/less/js/test/less/css-3.less +12 -0
- data/lib/less/js/test/less/css-guards.less +99 -0
- data/lib/less/js/test/less/debug/linenumbers.less +11 -1
- data/lib/less/js/test/less/empty.less +0 -0
- data/lib/less/js/test/less/errors/add-mixed-units.txt +4 -2
- data/lib/less/js/test/less/errors/add-mixed-units2.txt +4 -2
- 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/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/import-subfolder2.txt +4 -2
- 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/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/parse-error-curly-bracket.less +4 -1
- data/lib/less/js/test/less/errors/parse-error-curly-bracket.txt +4 -2
- 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.txt +2 -2
- 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/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-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/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 +12 -0
- data/lib/less/js/test/less/extend-selector.less +15 -0
- data/lib/less/js/test/less/extract-and-length.less +133 -0
- data/lib/less/js/test/less/functions.less +15 -2
- 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/import-inline.less +2 -0
- data/lib/less/js/test/less/import-once.less +2 -0
- data/lib/less/js/test/less/import-reference.less +18 -0
- data/lib/less/js/test/less/import/import-and-relative-paths-test.less +11 -0
- data/lib/less/js/test/less/import/import-reference.less +43 -0
- data/lib/less/js/test/less/import/import-test-f.less +5 -0
- data/lib/less/js/test/less/import/invalid-css.less +1 -0
- data/lib/less/js/test/less/media.less +25 -1
- data/lib/less/js/test/less/merge.less +59 -0
- data/lib/less/js/test/less/mixins-args.less +10 -0
- data/lib/less/js/test/less/mixins-guards-default-func.less +195 -0
- data/lib/less/js/test/less/mixins-guards.less +16 -0
- data/lib/less/js/test/less/mixins-important.less +4 -1
- data/lib/less/js/test/less/mixins-interpolated.less +69 -0
- data/lib/less/js/test/less/mixins.less +27 -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/parens.less +4 -0
- data/lib/less/js/test/less/property-name-interp.less +53 -0
- data/lib/less/js/test/less/selectors.less +13 -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/strings.less +6 -0
- data/lib/less/js/test/less/url-args/urls.less +63 -0
- data/lib/less/js/test/less/urls.less +15 -0
- 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 +48 -40
- data/lib/less/version.rb +1 -1
- data/spec/less/parser_spec.rb +15 -15
- metadata +146 -40
- data/lib/less/js/Makefile +0 -102
- data/lib/less/js/build/header.js +0 -9
- data/lib/less/js/test/browser-test-prepare.js +0 -46
- data/lib/less/js/test/browser/runner-errors.js +0 -5
- data/lib/less/js/test/browser/runner-main.js +0 -15
- data/lib/less/js/test/browser/template.htm +0 -10
- data/lib/less/js/test/less/errors/color-operation-error.txt +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cda87971c710025bff8ade858b229def9f977d87
|
4
|
+
data.tar.gz: 2507829b7fd2c2973021a9ecc5f6719bd935e50d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83a398fda51b41c60604cf740a6c63cfc5c4b1d07977d552973bf1412860929028ccef6e622c483b90698c4f938b63670a55d11f736993542d137ca191eb0b68
|
7
|
+
data.tar.gz: 504a2ccd28f704ba2f349975329bf5b929d516dada140c0072914c6c242e4b2a0a8e57d393d44e54e20383239cac791fd73e74d2ac1d43fcbb9ca4ece3f962de
|
data/Changelog.md
CHANGED
data/Gemfile
CHANGED
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
gem "therubyracer", "~> 0.
|
5
|
+
gem "therubyracer", "~> 0.12.0", :require => nil, :platforms => :ruby
|
6
6
|
gem "therubyrhino", ">= 2.0.2", :require => nil, :platforms => :jruby
|
7
7
|
|
8
8
|
group :development do
|
data/less.gemspec
CHANGED
@@ -11,8 +11,8 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.homepage = "http://lesscss.org"
|
12
12
|
s.summary = %q{Leaner CSS, in your browser or Ruby (via less.js)}
|
13
13
|
s.description = %q{Invoke the Less CSS compiler from Ruby}
|
14
|
-
|
15
14
|
s.rubyforge_project = "less"
|
15
|
+
s.license = 'Apache 2.0'
|
16
16
|
|
17
17
|
s.files = `git ls-files`.split("\n")
|
18
18
|
Dir.chdir('lib/less/js') do
|
data/lib/less/defaults.rb
CHANGED
@@ -2,12 +2,12 @@ module Less
|
|
2
2
|
module Defaults
|
3
3
|
|
4
4
|
def defaults
|
5
|
-
@defaults ||= { :paths => [], :relativeUrls => true }
|
5
|
+
@defaults ||= { :paths => [], :relativeUrls => true, :syncImport => true }
|
6
6
|
end
|
7
7
|
|
8
8
|
def paths
|
9
9
|
defaults[:paths]
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
end
|
13
|
-
end
|
13
|
+
end
|
data/lib/less/js/.gitattributes
CHANGED
data/lib/less/js/.gitignore
CHANGED
@@ -1,8 +1,24 @@
|
|
1
|
-
|
1
|
+
# OS and IDE
|
2
2
|
.emacs*
|
3
3
|
*.flymake
|
4
4
|
*~
|
5
5
|
.#*
|
6
6
|
.idea
|
7
|
+
*.sublime-*
|
8
|
+
|
9
|
+
# npm
|
10
|
+
node_modules
|
11
|
+
npm-debug.log
|
12
|
+
|
13
|
+
# project-specific
|
14
|
+
tmp
|
7
15
|
test/browser/less.js
|
8
|
-
test/
|
16
|
+
test/sourcemaps/*.map
|
17
|
+
test/sourcemaps/*.css
|
18
|
+
|
19
|
+
# grunt
|
20
|
+
.grunt
|
21
|
+
|
22
|
+
# gradle
|
23
|
+
.gradle
|
24
|
+
out
|
data/lib/less/js/CHANGELOG.md
CHANGED
@@ -1,3 +1,88 @@
|
|
1
|
+
# 1.6.2
|
2
|
+
|
3
|
+
2014-02-02
|
4
|
+
|
5
|
+
- The Rhino release is fixed!
|
6
|
+
- ability to use uppercase colours
|
7
|
+
- Fix a nasty bug causing syntax errors when selector interpolation is preceded by a long comment (and some other cases)
|
8
|
+
- Fix a major bug with the variable scope in guards on selectors (e.g. not mixins)
|
9
|
+
- Fold in `& when () {` to the current selector rather than duplicating it
|
10
|
+
- fix another issue with array prototypes
|
11
|
+
- add a url-args option which adds a value to all urls (for cache busting)
|
12
|
+
- Round numbers to 8 decimal places - thereby stopping javascript precision errors
|
13
|
+
- some improvements to the default() function in more complex scenarios
|
14
|
+
- improved missing '{' and '(' detection
|
15
|
+
|
16
|
+
# 1.6.1
|
17
|
+
|
18
|
+
2014-01-12
|
19
|
+
|
20
|
+
- support ^ and ^^ shadow dom selectors
|
21
|
+
- fix sourcemap selector (used to report end of the element or selector) and directive position (previously not supported)
|
22
|
+
- fix parsing empty less files
|
23
|
+
- error on (currently) ambiguous guards on multiple css selectors
|
24
|
+
- older environments - protect against typeof regex returning function
|
25
|
+
- Do not use default keyword
|
26
|
+
- use innerHTML in tests, not innerText
|
27
|
+
- protect for-in in case Array and Object prototypes have custom fields
|
28
|
+
|
29
|
+
# 1.6.0
|
30
|
+
|
31
|
+
2014-01-01
|
32
|
+
|
33
|
+
- Properties can be interpolated, e.g. @{prefix}-property: value;
|
34
|
+
- a default function has been added only valid in mixin definitions to determine if no other mixins have been matched
|
35
|
+
- Added a plugins option that allows specifying an array of visitors run on the less AST
|
36
|
+
- Performance improvements that may result in approx 20-40% speed up
|
37
|
+
- Javascript evaluations returning numbers can now be used in calculations/functions
|
38
|
+
- fixed issue when adding colours, taking the alpha over 1 and breaking when used in colour functions
|
39
|
+
- when adding together 2 colours with non zero alpha, the alpha will now be combined rather than added
|
40
|
+
- the advanced colour functions no longer ignore transparency, they blend that too
|
41
|
+
- Added --clean-option and cleancssOptions to allow passing in clean css options
|
42
|
+
- rgba declarations are now always clamped e.g. rgba(-1,258,258, -1) becomes rgba(0, 255, 255, 0)
|
43
|
+
- Fix possible issue with import reference not bringing in styles (may not be a bugfix, just a code tidy)
|
44
|
+
- Fix some issues with urls() being prefixed twice and unquoted urls in mixins being processed each time they are called
|
45
|
+
- Fixed error messages for undefined variables in javascript evaluation
|
46
|
+
- Fixed line/column numbers from math errors
|
47
|
+
|
48
|
+
# 1.5.1
|
49
|
+
|
50
|
+
2013-11-17
|
51
|
+
|
52
|
+
- Added source-map-URL option
|
53
|
+
- Fixed a bug which meant the minimised 1.5.0 browser version was not wrapped, meaning it interfered with require js
|
54
|
+
- Fixed a bug where the browser version assume port was specified
|
55
|
+
- Added the ability to specify variables on the command line
|
56
|
+
- Upgraded clean-css and fixed it from trying to import
|
57
|
+
- correct a bug meaning imports weren't synchronous (syncImport option available for full synchronous behaviour)
|
58
|
+
- better mixin matching behaviour with calling multiple classes e.g. .a.b.c;
|
59
|
+
|
60
|
+
# 1.5.0
|
61
|
+
|
62
|
+
2013-10-21
|
63
|
+
|
64
|
+
- sourcemap support
|
65
|
+
- support for import inline option to include css that you do NOT want less to parse e.g. `@import (inline) "file.css";`
|
66
|
+
- better support for modifyVars (refresh styles with new variables, using a file cache), is now more resiliant
|
67
|
+
- support for import reference option to reference external css, but not output it. Any mixin calls or extend's will be output.
|
68
|
+
- support for guards on selectors (currently only if you have a single selector)
|
69
|
+
- allow property merging through the +: syntax
|
70
|
+
- Added min/max functions
|
71
|
+
- Added length function and improved extract to work with comma seperated values
|
72
|
+
- when using import multiple, sub imports are imported multiple times into final output
|
73
|
+
- fix bad spaces between namespace operators
|
74
|
+
- do not compress comment if it begins with an exclamation mark
|
75
|
+
- Fix the saturate function to pass through when using the CSS syntax
|
76
|
+
- Added svg-gradient function
|
77
|
+
- Added no-js option to lessc (in browser, use javascriptEnabled: false) which disallows JavaScript in less files
|
78
|
+
- switched from the little supported and buggy cssmin (previously ycssmin) to clean-css
|
79
|
+
- support transparent as a color, but not convert between rgba(0, 0, 0, 0) and transparent
|
80
|
+
- remove sys.puts calls to stop deprecation warnings in future node.js releases
|
81
|
+
- Browser: added logLevel option to control logging (2 = everything, 1 = errors only, 0 = no logging)
|
82
|
+
- Browser: added errorReporting option which can be "html" (default) or "console" or a function
|
83
|
+
- Now uses grunt for building and testing
|
84
|
+
- A few bug fixes for media queries, extends, scoping, compression and import once.
|
85
|
+
|
1
86
|
# 1.4.2
|
2
87
|
|
3
88
|
2013-07-20
|
@@ -22,7 +107,7 @@
|
|
22
107
|
- fix passing of strict maths option
|
23
108
|
|
24
109
|
# 1.4.0 Beta 4
|
25
|
-
|
110
|
+
|
26
111
|
2013-05-04
|
27
112
|
|
28
113
|
- change strictMaths to strictMath. Enable this with --strict-math=on in lessc and strictMath:true in JavaScript.
|
@@ -55,7 +140,7 @@
|
|
55
140
|
- significant bug fixes to our debug options
|
56
141
|
- other parameters can be used as defaults in mixins e.g. .a(@a, @b:@a)
|
57
142
|
- an error is shown if properties are used outside of a ruleset
|
58
|
-
- added extract function which picks a value out of a list, e.g. extract(12 13 14, 3) =>
|
143
|
+
- added extract function which picks a value out of a list, e.g. extract(12 13 14, 3) => 14
|
59
144
|
- added luma, hsvhue, hsvsaturation, hsvvalue functions
|
60
145
|
- added pow, pi, mod, tan, sin, cos, atan, asin, acos and sqrt math functions
|
61
146
|
- added convert function, e.g. convert(1rad, deg) => value in degrees
|
data/lib/less/js/CONTRIBUTING.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
> We welcome feature requests and bug reports. Please read these guidelines before submitting one.
|
4
4
|
|
5
5
|
|
6
|
-
<span class="warning">**Words that begin with the at sign (`@`) must be wrapped in backticks!** </span>.
|
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
7
|
|
8
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
9
|
|
@@ -17,7 +17,9 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso
|
|
17
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
18
|
3. **Include a live example.** Please use [less2css.org](http://less2css.org/) for sharing your isolated test cases.
|
19
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.
|
20
21
|
|
22
|
+
Please report documentation issues in [the documentation project](https://github.com/less/less-docs).
|
21
23
|
|
22
24
|
## Feature Requests
|
23
25
|
|
@@ -33,8 +35,7 @@ _Pull requests are encouraged!_
|
|
33
35
|
* Start by adding a feature request to get feedback and see how your idea is received.
|
34
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.
|
35
37
|
* Do not change the **./dist/** folder, we do this when releasing
|
36
|
-
* _Please add tests_ for your work.
|
37
|
-
|
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.
|
38
39
|
|
39
40
|
### Coding Standards
|
40
41
|
|
@@ -0,0 +1,290 @@
|
|
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
|
+
},
|
219
|
+
|
220
|
+
// Clean the version of less built for the tests
|
221
|
+
clean: {
|
222
|
+
test: ['test/browser/less.js', 'tmp'],
|
223
|
+
"sourcemap-test": ['test/sourcemaps/*.css', 'test/sourcemaps/*.map']
|
224
|
+
}
|
225
|
+
});
|
226
|
+
|
227
|
+
// Load these plugins to provide the necessary tasks
|
228
|
+
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
|
229
|
+
|
230
|
+
// Actually load this plugin's task(s).
|
231
|
+
grunt.loadTasks('build/tasks');
|
232
|
+
|
233
|
+
// by default, run tests
|
234
|
+
grunt.registerTask('default', [
|
235
|
+
'test'
|
236
|
+
]);
|
237
|
+
|
238
|
+
// Release
|
239
|
+
grunt.registerTask('stable', [
|
240
|
+
'concat:stable',
|
241
|
+
'uglify:stable'
|
242
|
+
]);
|
243
|
+
|
244
|
+
// Release Rhino Version
|
245
|
+
grunt.registerTask('rhino', [
|
246
|
+
'concat:rhino',
|
247
|
+
'concat:rhinolessc'
|
248
|
+
]);
|
249
|
+
|
250
|
+
// Run all browser tests
|
251
|
+
grunt.registerTask('browsertest', [
|
252
|
+
'browser',
|
253
|
+
'connect',
|
254
|
+
'jasmine'
|
255
|
+
]);
|
256
|
+
|
257
|
+
// setup a web server to run the browser tests in a browser rather than phantom
|
258
|
+
grunt.registerTask('browsertest-server', [
|
259
|
+
'shell:browsertest-server'
|
260
|
+
]);
|
261
|
+
|
262
|
+
// Create the browser version of less.js
|
263
|
+
grunt.registerTask('browser', [
|
264
|
+
'concat:browsertest'
|
265
|
+
]);
|
266
|
+
|
267
|
+
// Run all tests
|
268
|
+
grunt.registerTask('test', [
|
269
|
+
'clean',
|
270
|
+
'jshint',
|
271
|
+
'shell:test',
|
272
|
+
'browsertest'
|
273
|
+
]);
|
274
|
+
|
275
|
+
// generate a good test environment for testing sourcemaps
|
276
|
+
grunt.registerTask('sourcemap-test', [
|
277
|
+
'clean:sourcemap-test',
|
278
|
+
'shell:sourcemap-test'
|
279
|
+
]);
|
280
|
+
|
281
|
+
// Run benchmark
|
282
|
+
grunt.registerTask('benchmark', [
|
283
|
+
'shell:benchmark'
|
284
|
+
]);
|
285
|
+
|
286
|
+
// Readme.
|
287
|
+
grunt.registerTask('readme', [
|
288
|
+
'concat:readme'
|
289
|
+
]);
|
290
|
+
};
|