As you can also see in the Using mixins with multiple parameters and Using duplicate mixin names recipes, only matching mixins are compiled into the final CSS code. In some situations, you don't know the number of parameters or want to use mixins for some style rules no matter the number of parameters. In these situations, you can use the special ...
syntax or the @rest...
variable to create mixins that match independent of the number of parameters.
You will have to create a file called rest.less
, and this file can be compiled with the command-line lessc
compiler, as described in the Installing the lessc compiler with npm in Chapter 1, Getting to Grips with the Basics of Less. You can edit the Less code with your favorite editor.