user5363938 user5363938 - 6 months ago 62
Less Question

error evaluating function `lighten`: a.toHSL is not a function

Sorry for novice question. I am taking the first baby steps to learn Less and Sass. Here is my less syle in the file

style.less
:

@basecolor:#53353;

header {
font-family: cursive,sans-serif;
background-color: lighten(@basecolor, 50%);
border: 5px solid darken(@basecolor, 50%);
color:@basecolor;
padding: 40px;
}


When i load the page, i face with the error:

RuntimeError: error evaluating function `lighten`: a.toHSL is not a function


I have looked at this, and it seems that the code is fine.
So what is the problem?

Answer Source

Your basecolor hex code only has 5 characters. You need 3 or 6.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download