Why is mix() not working with my colors in LESSC?

css, less, twitter-bootstrap

Solution

I had the exact same error.

Did some digging and found this:

The docs for mix are missing the third parameter.

Try:

@fallback-color: mix(@from-color, @to-color, 50%);

Note the third parameter. This solved it in my case, does this fix it for you?

Problem

My less file piggy-backs on to the end of the Twitter Bootstrap files (so things like `@white` are defined already. Here is my less code: ``` @columnSortScreen: #99f; // the color used @columnSort: mix( @white, @columnSortScreen ); ``` When compiled, I get the following error (everything underlined by carets is highlighted): ``` non_object_property_loadError: error evaluating function `mix`: Cannot read property 'value' of undefined in /Users/cmv/Sites/...../tablesorter.less:12:14 11 // the color used 12 @columnSort: mix( @white, @columnSortScreen ); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` What am I doing wrong? Lessc is version 1.3.0. Thanks!

Original source