Skip to content

Instantly share code, notes, and snippets.

@AaronLayton
Created May 18, 2015 09:34
Show Gist options
  • Save AaronLayton/fbd4f861053b15a9268d to your computer and use it in GitHub Desktop.
Save AaronLayton/fbd4f861053b15a9268d to your computer and use it in GitHub Desktop.
Tile Cascade mixin (Less)
.tile-cascade( @interval: 60ms, @delay: 0ms ) {
& > * {
&:first-child {
transition-delay: (@interval * 1) + @delay !important;
}
&:nth-child(2) {
transition-delay: @interval * 2 + @delay !important;
}
&:nth-child(3) {
transition-delay: @interval * 3 + @delay !important;
}
&:nth-child(4) {
transition-delay: @interval * 4 + @delay !important;
}
&:nth-child(5) {
transition-delay: @interval * 5 + @delay !important;
}
&:nth-child(6) {
transition-delay: @interval * 6 + @delay !important;
}
&:nth-child(7) {
transition-delay: @interval * 7 + @delay !important;
}
&:nth-child(8) {
transition-delay: @interval * 8 + @delay !important;
}
&:nth-child(9) {
transition-delay: @interval * 9 + @delay !important;
}
&:nth-child(10) {
transition-delay: @interval * 10 + @delay !important;
}
&:nth-child(11) {
transition-delay: @interval * 11 + @delay !important;
}
&:nth-child(12) {
transition-delay: @interval * 12 + @delay !important;
}
}
}
.tile-cascade {
.tile-cascade();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment