Mixin in LESS are group of CSS properties which have similarities to functions in other programming languages. LESS mixins allow us to include all the properties of an existing class or ids into another by including the class/id name as its property. The syntax and features of LESS mixin are closely related to the CSS. They can be declared in same way as we declare a CSS style rule, i.e, using a class or an ID selector. It can also be used to store more than one value and can be reused throughout the code whenever necessary.
LESS mixins can be used in different ways:
Making mixin disappear from the output
With Selectors as argument
Example 1: Simple LESS mixin where an existing id Square is included in other ids