cloudhead/less.js — Issue #649: Can't get "Match on arity" to work?
Author: joacim-boive
Created: 2012-02-22 15:01:25+00:00
State: open

This is what I have:

get.less:
.box-shadow(@none:none) {
-webkit-box-shadow: @none; /* Saf3-4, iOS 4.0.2 - 4.2, Android 2.3+ */
-moz-box-shadow: @none; /* FF3.5 - 3.6 */
box-shadow: @none; /* Opera 10.5, IE9, FF4+, Chrome 6+, iOS 5 */
}

.box-shadow(@topright: 0, @bottomright: 0, @bottomleft: 0, @topleft: 0, @color: #000) {
-webkit-box-shadow: @arguments; /* Saf3-4, iOS 4.0.2 - 4.2, Android 2.3+ */
-moz-box-shadow: @arguments; /* FF3.5 - 3.6 */
box-shadow: @arguments; /* Opera 10.5, IE9, FF4+, Chrome 6+, iOS 5 */
}

.box-shadow(@inset, @topright: 0, @bottomright: 0, @bottomleft: 0, @topleft: 0, @color: #000) {
-webkit-box-shadow: @arguments; /* Saf3-4, iOS 4.0.2 - 4.2, Android 2.3+ */
-moz-box-shadow: @arguments; /* FF3.5 - 3.6 */
box-shadow: @arguments; /* Opera 10.5, IE9, FF4+, Chrome 6+, iOS 5 */
}

more.less:
@import "get.less";

div{
.box-shadow(none);
}

What I get in more.css:
div{
-webkit-box-shadow : none;
-moz-box-shadow : none;
box-shadow : none;
-webkit-box-shadow : none 0 0 0 #000;
-moz-box-shadow : none 0 0 0 #000;
box-shadow : none 0 0 0 #000;
-webkit-box-shadow : none 0 0 0 0 #000;
-moz-box-shadow : none 0 0 0 0 #000;
box-shadow : none 0 0 0 0 #000
}

I expect to get:

div{
-webkit-box-shadow : none;
-moz-box-shadow : none;
box-shadow : none;
}

Am I missing something here?

Thanks!

/J