Less Parametric Mixins
Less parametric mixin is a special mixin in which one or more parameters are used to extend functionality of Less by taking arguments and its properties and customize the mixin output when mixed into another block.
Let's see an example of parametric mixin:
Here, the parametric mixin is border which has three parameters named width, style and color. These parameters are used to customize the mixin output according to passed parameter values.
A list of different types of parametric mixins:
||Mixins with Multiple Parameters
||In this type of mixins, parameters can be separated using commas or semicolon.
||In Named Parameters, mixins provides parameters values instead of positions by using their names.
|| @arguments variable includes all the passed arguments when mixin was called.
||Advanced Arguments and the @rest Variable
||Mixin takes variable number of arguments by using .....
||Pattern-matching is used change the behavior of mixin by passing parameters to it.