⊗mkLsBsVCB 29 of 41 menu

Code block in LESS variable

You can write not only a value into a variable, but also a whole block of code, like this:

@test: { width: 100px; height: 100px; }

To output a block of code written in a variable, you need to write the name of the variable and parentheses, like this:

div { @test(); }

As a result, after compilation we will get the following code:

div { width: 100px; height: 100px; }
enru