Mostafa p
Mostafa p

Reputation: 1

How do I change the primary-color value in less?

How do I change the primary-color value in less? I write it down but it doesn't work

@primary-color: red;
.header {@primary-color: blue;}

Upvotes: 0

Views: 439

Answers (1)

MBadrian
MBadrian

Reputation: 409

you must Change Code to This

@primary-color: backgound-color;
.header {@{primary-color}: blue;}

OR

@primary-color: red;
.header {background-color: @primary-color;}

i think you want this

@primary-color: red;
.header { @primary-color:blue;}
 p{
   .header();
   color:@primary-color;
}


Upvotes: 1

Related Questions