Skip to content

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

Closed

Description

@chelmertz

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.

Activity

  1. revolunet commented on Jun 16, 2011

    @revolunet
    Contributor

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

  2. chelmertz commented on Jun 16, 2011

    @chelmertz
    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!

  3. rubensayshi commented on Dec 21, 2012

    @rubensayshi

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

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

  4. lukeapage commented on Dec 21, 2012

    @lukeapage
    Member

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

  5. lukeapage commented on Dec 21, 2012

    @lukeapage
    Member

    .. use rgba

  6. added a commit that references this issue on Sep 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions