cloudhead/less.js — Issue #573: 0 arity mixin merged into different arity mixins
Author: leafo
Created: 2012-01-15 07:30:08+00:00
State: open

It appears that mixins with an empty argument list are merged into all mixins of the same name that have any number of arguments.

Is this intentional? It seems confusing.

.rad(@hello) {
color: blue;
}

.rad(@hello, @another) {
color: red;
}

.rad() {
color: black;
}

.rad {
blank: yes;
}

body {
x: xxx;
.rad('hello');
x: xxx;
.rad('hello', 'world');
x: xxx;
.rad;
}

outputs:

.rad {
blank: yes;
}
body {
x: xxx;
color: blue;
color: black;
x: xxx;
color: red;
color: black;
x: xxx;
color: black;
blank: yes;
}