Skip to content

Instantly share code, notes, and snippets.

@bredfield
Last active December 29, 2015 00:09
Show Gist options
  • Save bredfield/7584309 to your computer and use it in GitHub Desktop.
Save bredfield/7584309 to your computer and use it in GitHub Desktop.
Incremental animation of author circles.
@iterations: 20;
.circle-loop (@index) when (@index > 0) {
(~".circle-@{index}") {
@change: (@index) * 4px;
z-index: @iterations - @index;
width: 40px;
height: 40px;
top: 23px;
left: 23px;
.transition(all .3s (@index*.1s));
&.out{
left: @index * 80px + 20px;
.first() when (@index = 1){
left: 120px;
}
.first();
width: 70px;
height: 70px;
top: 8px;
.transition-duration(.3s);
.opacity(1);
}
}
.circle-loop(@index - 1);
}
.circle-loop (0) {}
.circle-loop (@iterations);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment