Skip to content

Instantly share code, notes, and snippets.

@wnstn
Created August 1, 2012 19:09
Show Gist options
  • Save wnstn/3229867 to your computer and use it in GitHub Desktop.
Save wnstn/3229867 to your computer and use it in GitHub Desktop.
SCSS Loops
#foo {
-webkit-animation: foo 2s 3s normal;
-moz-animation: foo 2s 3s normal;
-ms-animation: foo 2s 3s normal;
-o-animation: foo 2s 3s normal;
animation: foo 2s 3s normal; }
@mixin animation($name, $duration: 1s, $delay: 0s, $direction: normal) {
@each $vendor in -webkit, -moz, -ms, -o {
#{$vendor}-animation: #{$name} #{$duration} #{$delay} #{$direction};
}
animation: #{$name} #{$duration} #{$delay} #{$direction};
}
#foo {
@include animation(foo, 2s, 3s, normal);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment