Sass mixins are not replacing variables -
i'm trying use sass mixin automatically use vendor-prefixes on animations. mixin:
@mixin keyframes($name) { @-o-keyframes $name { @content }; @-moz-keyframes $name { @content }; @-webkit-keyframes $name { @content }; @keyframes $name { @content }; }
now if include this:
@include keyframes(test) { { opacity: 0; } { opacity: 1; } }
the resulting css looks this:
@-o-keyframes $name { ... } @-moz-keyframes $name { ... } @-webkit-keyframes $name { ... } @keyframes $name { ... }
sass not replacing $name
test
. known bug or there workarounds? couldn't find related problem. i'm using sass version 3.4.1 way.
change $name
#{$name}
in mixin
@mixin keyframes($name) { @-o-keyframes #{$name} { @content }; @-moz-keyframes #{$name} { @content }; @-webkit-keyframes #{$name} { @content }; @keyframes #{$name} { @content }; }
Comments
Post a Comment