0

I have this scss code

$list: -moz-, -o-, -webkit-;


@each $prefix in $list {
    @#{prefix}keyframes spin {
          0% {
            #{prefix}transform: rotate(0deg);
          }
          100% {
            #{prefix}transform: rotate(359deg);
          }
    }
}

But it returns @" exected identifier, was "#{prefix}keyfra...

How can I put the variable #{prefix} in the keyframe identifier ?

Newcoma
  • 799
  • 4
  • 13
  • 31
  • in addition to the "@" problem (that has the solution in @cimmanon's answer) your idea will not work as you can not dynamically generate keyframes with prefixes in plain Sass ... you could use some kind of autoprefixing plugin (compass and autoprefixer) or write a simple mixin, like I proposed here: http://stackoverflow.com/questions/20024962/browser-prefixes-as-variables-through-each-sass/20026077#20026077 – Martin Turjak Nov 27 '13 at 17:04
  • Thanks both of you. I'll get on with it – Newcoma Nov 28 '13 at 15:14

0 Answers0