Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Javatpoint Logo
Javatpoint Logo

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:

Index Types Explanation
1) Mixins with Multiple Parameters In this type of mixins, parameters can be separated using commas or semicolon.
2) Named Parameters In Named Parameters, mixins provides parameters values instead of positions by using their names.
3) @arguments Variable @arguments variable includes all the passed arguments when mixin was called.
4) Advanced Arguments and the @rest Variable Mixin takes variable number of arguments by using .....
5) Pattern-matching Pattern-matching is used change the behavior of mixin by passing parameters to it.





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA