Error when using mix function in LESS in rails

843 Views Asked by At

Using the less-rails gem.

Using the following code to mix two colours:

@base: #ffdc52;
@add: #195742;
.colour{
    color: mix(@base, @add);
}

getting the following error:

Less::ParseError: error evaluating function `mix`: Cannot read property 'value' of undefined
1

There are 1 best solutions below

1
On BEST ANSWER

mix needs three parameters:

mix: function (color1, color2, weight) {
    var p = weight.value / 100.0;
    ...
},