bourbon icon indicating copy to clipboard operation
bourbon copied to clipboard

Keyframes mixin not setting animation name correctly

Open metaprogrammed opened this issue 11 years ago • 4 comments

I upgraded from 3.1.8 to 3.2.4 and the keyframes mixin is no longer setting the animation name correctly. Sass:

  @include keyframes(testAnim)
  {
    0% { opacity: 0;}
    100% {opacity: 1;}
  }

Css Output:

@-webkit-keyframes $animationName {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@-moz-keyframes $animationName {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@-o-keyframes $animationName {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes $animationName {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

Love using Bourbon, thanks a lot!

metaprogrammed avatar Feb 12 '15 18:02 metaprogrammed

Hi @metaprogrammed. Is $animationName something that is coming from your code? It's not something that is used in the Bourbon code. I tried searching for that variable and found some examples of Compass code that use it, and it may have come from a bug in Compass. Is it possible you're using both for some reason?

joshuaogle avatar Feb 12 '15 18:02 joshuaogle

I'm not using Compass and I couldn't find $animationName in the project but I am using Foundation, and removing it from the project did fix the problem. Appreciate the help.

metaprogrammed avatar Feb 12 '15 19:02 metaprogrammed

Upon further investigation the problem appears to have been an override I wrote for Foundation a while back that was conflicting with the keyframes mixin. Sorry about that and thanks for your help!

metaprogrammed avatar Feb 12 '15 19:02 metaprogrammed

Good sleuthing. Glad you found the problem!

joshuaogle avatar Feb 12 '15 19:02 joshuaogle