Home > Blockchain >  Using custom variable in Less function
Using custom variable in Less function

Time:02-25

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?

CodePudding user response:

Remove the quotes around #fff :

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