treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Set css animation name with Sass variable? (mixin)

  • 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?
  • nevermind...figured it out. I did this:

    @-webkit-keyframes #{$thename}