Pandorque
Pandorque

Reputation: 396

Using custom variable in Less function

I'm having some trouble using a less variable into a less function. My code looks like this :

@primaryColor: "#fff";
@customColor: darken(@primaryColor, 5%);

But I'm getting the following error :

Error evaluating function darken: Argument cannot be evaluated to a color

I have no idea what I'm doing wrong. Can anyone help me?

Upvotes: 0

Views: 317

Answers (1)

Tom
Tom

Reputation: 5677

Remove the quotes around #fff :

@primaryColor: #fff;
@customColor: darken(@primaryColor, 5%);

Upvotes: 1

Related Questions