Why does mix () not work with my colors in LESSC?

My smaller copy files are at the end of Twitter Bootstrap files (so things like this @whiteare already defined. Here is my less code:

@columnSortScreen: #99f;
// the color used
@columnSort: mix( @white, @columnSortScreen );

When compiling, I get the following error (everything is highlighted with underscores):

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 - version 1.3.0.

Thank!

+3
source share
1 answer

I had the same error.

Someone was digging and found this:

There is no third parameter in the docs for mix.

Try:

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

Pay attention to the third parameter. This resolved this in my case, does this fix it for you?

+6
source

All Articles