Grow your CSS skills. Land your dream job.

Can you chain functions in compass?

  • # March 27, 2013 at 11:50 am

    Is there a way to do something like:
    @include contrasted(adjust-lightness($color, $amount));

    That example is just random, but you get the idea of what I’m asking.
    When I do this, Codekit errors out, so I’m wondering if there is syntax to allow this at all?

    # March 27, 2013 at 12:14 pm

    Are you sure the problem isn’t elsewhere? I just did

    $color: #e5e5e5;
    $amount: 15;
    @include contrasted(adjust-lightness($color, $amount));

    And there was no issue with it. I don’t use Codekit, admittedly, I use standard compass on the terminal.

    # March 27, 2013 at 1:07 pm

    Right you are!
    I’m not sure where the error of my ways was, but your code worked just fine.
    Good to know. Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".