dotless/dotless — Issue #103: Scoping bug?
Author: kalumet
Created: 2011-11-25 09:21:01+00:00
State: open

Hi there,

In our project we are using the lessc compiler and the dotless compiler. First I was very happy to have found a way to create a function with a return value, such that I can use this return value and do some further calculation:

.doSomeCalc(@param1, @param2) {
@returnValue: @param1 + @param2;
}

.doSomeCalc(1px, 2px);
width: @returnValue + 3px;

Although this code works in dotless and might be very nice as a feature, it doesn't work in lessc and I guess it is a bug in dotless.

I would love to be able to use this pattern however (defining a return value), but I'm not sure how to create an own function in less with a return value. At least I couldn't find any documentation on this.

Cheers.