[Pkg-javascript-commits] [less.js] 27/285: Merge branch 'master' into 2_0_0

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:23:34 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v2.0.0
in repository less.js.

commit ee643923627fe9f70c91787743d20fc39ffa2db8
Merge: e30cccc 0c8e117
Author: Luke Page <luke.a.page at gmail.com>
Date:   Thu Feb 27 21:12:49 2014 +0000

    Merge branch 'master' into 2_0_0
    
    Conflicts:
    	lib/less/import-visitor.js
    	lib/less/index.js

 CHANGELOG.md                                   |   11 +-
 Gruntfile.js                                   |    6 +-
 README.md                                      |    4 +-
 bin/lessc                                      |    2 +-
 bower.json                                     |    6 +-
 build/README.md                                |    2 +-
 dist/less-1.7.0.js                             | 7921 ++++++++++++++++++++
 dist/less-1.7.0.min.js                         |   16 +
 dist/less-rhino-1.7.0.js                       | 9301 ++++++++++++++++++++++++
 lib/less/rhino.js => dist/lessc-rhino-1.7.0.js |    7 +-
 lib/less/functions.js                          |    8 +
 lib/less/import-visitor.js                     |   34 +-
 lib/less/parser.js                             |    6 +-
 lib/less/rhino.js                              |    2 +-
 lib/less/tree/color.js                         |   12 +-
 lib/less/tree/import.js                        |    9 +-
 package.json                                   |    2 +-
 test/css/functions.css                         |    7 +-
 test/index.js                                  |    2 +-
 test/less/functions.less                       |   11 +-
 20 files changed, 17339 insertions(+), 30 deletions(-)

diff --cc CHANGELOG.md
index 7d2e782,fd76027..cd0d5c1
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -1,22 -1,16 +1,27 @@@
 +#2.0.0
 +
 +2014-??-??
 +
 + - no longer including old versions of less in the repo or npm
 + - not including test and gradle files in npm (Note: TODO may need to move some test framework into lib for core plugins)
 + - colours now output in the format they are added unless compressing, so yellow will output yellow, not its hex counterpart
 +TODO
 + - Environment Support
 + - Finalised Plugin Support
 +
  # 1.7.0
  
- 2014-??-??
+ 2014-02-27
  
+  - Add support for rulesets in variables and passed to mixins to allow wrapping
+  - 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.
+  - Upgraded clean css which means the --selectors-merge-mode is now renamed --compatibility
   - Add support for using variables with @keyframes, @namespace, @charset
-  - Fix support for `.mixin(@args...)` when called with no args (e.g. `.mixin();`)
   - Support property merging with +_ when spaces are needed and keep + for comma separated
+  - Imports now always import once consistently - a race condition meant previously certain configurations would lead to a different ordering of files
+  - Fix support for `.mixin(@args...)` when called with no args (e.g. `.mixin();`)
   - Do unit conversions with min and max functions. Don't pass through if not understood, throw an error
+  - Allow % to be passed on its own to the unit function e.g. `unit(10, %)`
   - 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.)
   - Fix mixins with media queries in import reference files not being put into the output (they now output, they used to incorrectly not)
   - Fix lint mode - now reports all errors
diff --cc lib/less/import-visitor.js
index 7b1cbcc,7d69337..b94f58d
--- a/lib/less/import-visitor.js
+++ b/lib/less/import-visitor.js
@@@ -1,5 -1,5 +1,5 @@@
 -(function (tree) {
 +module.exports = function (tree) {
-     tree.importVisitor = function(importer, finish, evalEnv) {
+     tree.importVisitor = function(importer, finish, evalEnv, onceFileDetectionMap, recursionDetector) {
          this._visitor = new tree.visitor(this);
          this._importer = importer;
          this._finish = finish;
diff --cc lib/less/parser.js
index ee56599,9a1bf7e..2afa3f4
--- a/lib/less/parser.js
+++ b/lib/less/parser.js
@@@ -2068,6 -2066,3 +2068,6 @@@ Parser.serializeVars = function(vars) 
  
      return s;
  };
 +
 +return Parser;
- };
++};
diff --cc lib/less/tree/color.js
index c902a13,eac71f7..0cf128b
--- a/lib/less/tree/color.js
+++ b/lib/less/tree/color.js
@@@ -23,10 -23,22 +23,20 @@@ var Color = function (rgb, a) 
      this.alpha = typeof(a) === 'number' ? a : 1;
  };
  
 -var transparentKeyword = "transparent";
 -
 -tree.Color.prototype = {
 +Color.prototype = {
      type: "Color",
      eval: function () { return this; },
-     luma: function () { return (0.2126 * this.rgb[0] / 255) + (0.7152 * this.rgb[1] / 255) + (0.0722 * this.rgb[2] / 255); },
+     luma: function () {
+         var r = this.rgb[0] / 255,
+             g = this.rgb[1] / 255,
+             b = this.rgb[2] / 255;
+ 
+         r = (r <= 0.03928) ? r / 12.92 : Math.pow(((r + 0.055) / 1.055), 2.4);
+         g = (g <= 0.03928) ? g / 12.92 : Math.pow(((g + 0.055) / 1.055), 2.4);
+         b = (b <= 0.03928) ? b / 12.92 : Math.pow(((b + 0.055) / 1.055), 2.4);
+ 
+         return 0.2126 * r + 0.7152 * g + 0.0722 * b;
+     },
  
      genCSS: function (env, output) {
          output.add(this.toCSS(env));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list