Delay child elements in a sass animation
// @include animDelay(5);
@mixin animDelay($max) {
@for $i from 1 through $max {
&:nth-child(#{$i}) {
// transition: all .2s #{$i * .1}s ease-in;
animation-delay: #{($i / 9)}s;
}
}
}
TODO #
- default nth child count or better way to find nth children count
- second paramater for how delayed each child should be