leafo/lessphp — pull request #171 by sporkexec (2012-01-06 22:48:54+00:00)
Title: Support for @arguments variable (lessjs compatibility)

[As seen in lessjs.](http://lesscss.org/#-parametric-mixins)

One problem I'm aware of is that leaving the mixin argument list empty in the definition causes no arguments to be output, even when supplied. For example:

@spam() {
foo: @arguments;
bar: @arguments;
}

.eggs {
@spam(1px, 2px, 4px, 8px);
}

Results in:

.eggs {
foo:;
bar:;
}

This is because variables that aren't defined in the argument list aren't stored in the environment during parsing. In lessjs, the example shown works as you might expect. This behavior isn't explicitly documented, though, so I don't know if you care.

Also support for multiple values, eg. multiple borders or box-shadows with `@arguments` is shaky. It won't actually break, but it might be confusing if users don't fully understand when to use spaces vs. commas to separate arguments. Lessjs can't do this with `@arguments` at all, actually. =)