Skip to content

Can't use color function on variable with named color #289

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

Closed
chelmertz opened this issue Jun 9, 2011 · 5 comments
Closed

Can't use color function on variable with named color #289

chelmertz opened this issue Jun 9, 2011 · 5 comments

Comments

@chelmertz
Copy link

With less 1.3.3, I can't write the following:

@main_color: pink;
@alt_color: lighten(@main_color, 10%);

without getting:

error evaluating function `lighten`
test.less on line 2, column 13:

1@main_color: pink;
2@alt_color: lighten(@main_color, 10%);

This is surely a duplicate bug report but I couldn't find the previous one (please post the link here if this gets closed). Cheers.

@revolunet
Copy link
Contributor

see this pull request : #285
i added definitions and conversion for 146 css named colors

@chelmertz
Copy link
Author

@revolunet: I haven't tried your patch yet but it looks very solid. Perhaps the two of us are the only ones using spelled out colors :) Good job!

@rubensayshi
Copy link

@main_color: transparent;
@alt_color: lighten(@main_color, 10%);

(still) not working, is this not supposed to work because of transparent?

@lukeapage
Copy link
Member

transparent isn't a recognised colour in less.js... it was, then it wasn't.. it got complicated...

@lukeapage
Copy link
Member

.. use rgba

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

No branches or pull requests

5 participants