It is possible to achieve something like this in LESS?
.some-button(@className) {
@className { .actionIcon; }
tr:hover {
@className { .actionButton; }
}
}
When I call it:
.some-button(.edit-action);
The expected output should be :
.edit-action { .actionIcon; }
tr:hover { .edit-action { .actionButton; } }
Currently I'm getting this "Unrecognized input in @className { .actionIcon; }" error:
.some-button(@className) {
@className { .actionIcon; }
tr:hover {
EDIT
Another thing I would like to achieve is to use a mixin as mixin parameter:
.actionButton(@buttonClassName; @buttonType) {
@{buttonClassName} {
.actionIcon;
}
tr:hover {
@{buttonClassName} {
.actionHoverIcon;
@buttonType();
}
}
}
and call is like this:
.actionButton(~'.row-edit', button-harmful);
where button-harmful is a mixin.