Google News
logo
Less - Interview Questions
How do you represent a variable in Less?
It is required to declare a variable with @ symbol and uses a colon (:) to assigned the particular value in the variable. It is also necessary to add a semi-colon (;) after the value of the variable.
 
For example :
@primarycolor: #FF7F50;  
@color:#800080;  
h1 {  
   color: @primarycolor;  
}  
  
h3 {  
   color: @color;  
} 
 
In the above example of Less, the two variables used in the Less programming having values #FF7F50 and #800080.
Advertisement