Unable to use Parameterized Mixins with the latest build.

Aug 29, 2013 at 6:34 PM
I am new to Less Css so this could be a user error.

I installed the latest BundleTransformer.Less and its dependency through nuget today.

Variables are rendering great, and i can use mixins without parameters, but when i do the following the CSS is simply ignored. No error, and no output for the css.

.rounded-corners (@radius: 5px) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
-ms-border-radius: @radius;
-o-border-radius: @radius;
border-radius: @radius;
}

Once i add the "()" its stops working. I can pull the parameter out and simply use it as a variable and everything works fine. Any help would be helpful before i open this up as a bug.
Coordinator
Aug 30, 2013 at 7:36 AM
I have everything working correctly.

I recommend to read the corresponding section of the documentation - http://lesscss.org/#-mixins
Aug 30, 2013 at 12:27 PM
Thanks for the quick response. I got it to work now. I didn't get from the documentation that i had to reference the parameterized class in another style in order to use it. I assumed i could use it directly. So when i call #header style is applied accordingly, but when i use the class "rounded-corner" nothing happens.

.rounded-corners (@radius: 5px) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
-ms-border-radius: @radius;
-o-border-radius: @radius;
border-radius: @radius;
}

header {

.rounded-corners;
}

footer {

.rounded-corners(10px);
}
Coordinator
Aug 31, 2013 at 7:33 AM
I have everything works correctly and output I get the following code:
header {
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
}
footer {
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
  border-radius: 10px;
}
You installed BundleTransformer.Less or BundleTransformer.LessLite?
Sep 3, 2013 at 1:21 PM
I installed Bundletransformer.Less. You are correct. IN the example you provided i am producing the header/footer css. No Css for the class "rounded-corner" is being produced, but i beleive that is expected.