cloudhead/less.js — Issue #609: Create function with return value
Author: MarianaSilva
Created: 2012-01-31 17:09:42+00:00
State: open

Hello!

I need to do something like this:

.GetColorByLightness (@color) when (lightness(@color) < 50%) {
return #FFFFFF;
}
.GetColorByLightness (@color) when (lightness(@color) >= 50%) {
return #000000;
}

body{
color: .GetColorByLightness(#CCC);
}

So I need to create a function that I can use to return a value and not an attibute and its value.

Thanks,
Mariana Silva