$n: 16; $d: .375em; .ring { position: absolute; top: 50%; left: 50%; margin: -$d/2; width: $d; height: $d; border-radius: 50%; animation: rot .5s linear infinite; @for $i from 0 to $n { $m: ($i + 1)*4; $ba: 360deg/$m; $r: ($i + .5)*3*$d; $sh: (); @for $j from 0 to $m { $sh: $sh, $r*cos($j*$ba) $r*sin($j*$ba); } &:nth-child(#{$i + 1}) { box-shadow: $sh; animation-duration: pow($i + 1, 1.5)*.5s; } } } @keyframes rot { to { transform: rotate(360deg); } }