Grow your CSS skills. Land your dream job.

Set css animation name with Sass variable? (mixin)

  • # June 4, 2012 at 12:02 am

    yo yo,

    im trying this:


    =hello($thename, $c_1)
    @-webkit-keyframes $thename
    0%
    color: #fff
    left: -200%
    100%
    color: $c_1
    left: auto

    +hello(one, $c_1)

    and im getting this:


    @-webkit-keyframes $thename {
    0% { color: white; left: -200%; }
    100% { color: #0080ff; left: auto; } }

    is it not possible to assign an animation name with a variable in a mixin?

    # June 4, 2012 at 12:09 am

    nevermind…figured it out. I did this:


    @-webkit-keyframes #{$thename}
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

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