Skip to content

Commit

Permalink
Fixes less#3338 - missed mix() function
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-dean committed Feb 12, 2019
1 parent d36c3e5 commit a782764
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/less/functions/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,16 +299,12 @@ colorFunctions = {
// http://sass-lang.com
//
mix: function (color1, color2, weight) {
if (!color1.toHSL || !color2.toHSL) {
console.log(color2.type);
console.dir(color2);
}
if (!weight) {
weight = new Dimension(50);
}
var p = weight.value / 100.0;
var w = p * 2 - 1;
var a = color1.toHSL().a - color2.toHSL().a;
var a = toHSL(color1).a - toHSL(color2).a;

var w1 = (((w * a == -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
var w2 = 1 - w1;
Expand Down

0 comments on commit a782764

Please sign in to comment.