Skip to content

Instantly share code, notes, and snippets.

@tomleo
Created August 27, 2014 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomleo/28a333ebc273f424eb58 to your computer and use it in GitHub Desktop.
Save tomleo/28a333ebc273f424eb58 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.0)
// ----
@mixin animation($animate...) {
$max: length($animate);
$animations: '';
@for $i from 1 through $max {
$animations: #{$animations + nth($animate, $i)};
@if $i < $max {
$animations: #{$animations + ", "};
}
}
-webkit-animation: $animations;
-moz-animation: $animations;
-o-animation: $animations;
animation: $animations;
}
@mixin keyframes($animationName) {
@-webkit-keyframes #{$animationName} {
@content;
}
@-moz-keyframes #{$animationName} {
@content;
}
@-o-keyframes #{$animationName} {
@content;
}
@keyframes #{$animationName} {
@content;
}
}
@for $item from 1 through 5 {
li:nth-child(#{$item}) {
@include animation("fade_out 1s #{$item}s");
}
}
li:nth-child(1) {
-webkit-animation: fade_out 1s 1s;
-moz-animation: fade_out 1s 1s;
-o-animation: fade_out 1s 1s;
animation: fade_out 1s 1s;
}
li:nth-child(2) {
-webkit-animation: fade_out 1s 2s;
-moz-animation: fade_out 1s 2s;
-o-animation: fade_out 1s 2s;
animation: fade_out 1s 2s;
}
li:nth-child(3) {
-webkit-animation: fade_out 1s 3s;
-moz-animation: fade_out 1s 3s;
-o-animation: fade_out 1s 3s;
animation: fade_out 1s 3s;
}
li:nth-child(4) {
-webkit-animation: fade_out 1s 4s;
-moz-animation: fade_out 1s 4s;
-o-animation: fade_out 1s 4s;
animation: fade_out 1s 4s;
}
li:nth-child(5) {
-webkit-animation: fade_out 1s 5s;
-moz-animation: fade_out 1s 5s;
-o-animation: fade_out 1s 5s;
animation: fade_out 1s 5s;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment