The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

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
    color: #fff
    left: -200%
    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

    This reply has been reported for inappropriate content.

    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.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed