Google News
logo
Less - Interview Questions
What is the use of Mixins in Less?
In Less, Mixins facilitates you to add the set of properties from one rule-set into another rule-set. It includes class names as its properties. Mixins can be declared as the same way as CSS style using a class or id selector. It can store multiple values and can be reused in the code whenever necessary.
 
Syntax :
 
.box-radius{    
  border-radius: 2px;    
  -moz-border-radius: 2px;    
  -webkit-border-radius: 2px;    
}    
#menu {    
  color: red;    
  .box-radius;    
}
Advertisement