Skip to content

Instantly share code, notes, and snippets.

@colmjude
Created April 29, 2013 17:04
Show Gist options
  • Save colmjude/5483044 to your computer and use it in GitHub Desktop.
Save colmjude/5483044 to your computer and use it in GitHub Desktop.
/*
Usage:
@include keyframes(animate) {
0% { left: 0%; }
100% { left: 100%; }
}
*/
@mixin keyframes($name) {
@-webkit-keyframes $name { @content; }
@-moz-keyframes $name { @content; }
@-o-keyframes $name { @content; }
@keyframes $name { @content; }
}
/*
Usage:
@include animation(animate 5s linear infinite 3s normal);
*/
@mixin animation($type) {
@each $prefix in -webkit-, -moz-, -o-, '' {
#{$prefix}animation: $type;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment