⊗mkLsBsPSB 10 of 41 menu

Connecting parts of a selector in LESS

You can even connect parts of the same class. For example, like this:

.button { &-ok { color: green; } &-cancel { color: red; } }

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

.button-ok { color: green; } .button-cancel { color: red; }

Simplify the given code:

.label-success { color: green; } .label-warning { color: yellow; } .label-error { color: red; }
enru