Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create function with return value #609

Closed
MarianaSilva opened this issue Jan 31, 2012 · 2 comments
Closed

Create function with return value #609

MarianaSilva opened this issue Jan 31, 2012 · 2 comments

Comments

@MarianaSilva
Copy link

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

@tylertate
Copy link

I've just proposed similar functionality in issue 637.

@lukeapage
Copy link
Member

going to move discussion over custom functions over to #637 - more comments there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants