⊗mkLsBsAFP 25 of 41 menu

All function parameters in LESS

Let us have the following function:

.border(@w, @c, @t) { border: @w @c @t; }

When creating such a function, it is not very convenient that we first have to list all the parameters in the function declaration, and then list the same parameters inside the function.

A special key variable @arguments will come to the rescue, containing all the parameters of the function. Let's simplify our code by using this variable:

.border(@w, @c, @t) { border: @arguments; }

Simplify the code of the following function:

.shadow(@x, @y, @r, @w, @c) { box-shadow: @x @y @r @w @c; }
enru