Skip to content

Instantly share code, notes, and snippets.

@TweededBadger
Created September 17, 2014 20:41
Show Gist options
  • Save TweededBadger/dc3500298428bba3329f to your computer and use it in GitHub Desktop.
Save TweededBadger/dc3500298428bba3329f to your computer and use it in GitHub Desktop.
@animlength: 5;
@from: 1;
@to: 12;
.loop (@index) when (@index =< @to) {
path:nth-of-type(@{index}){
-webkit-animation-delay: unit((@index/@to)*@animlength, s);
animation-delay: unit((@index/@to)*@animlength, s);
}
.loop(@index + 1);
}
.loop(0) {}
.loop(@from);
path {
fill: #000000 !important;
animation:myfirst unit(@animlength,s);
-moz-animation:myfirst unit(@animlength,s) infinite; /* Firefox */
-webkit-animation:myfirst unit(@animlength,s) infinite; /* Safari and Chrome */
}
@-moz-keyframes myfirst /* Firefox */
{
0% {fill:red;}
90% {fill:yellow;}
100% {fill:red;}
}
@-webkit-keyframes myfirst /* Safari and Chrome */
{
0% {fill:red;}
90% {fill:yellow;}
100% {fill:red;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment