8色$colorsを順番に回す
div {
$length: length($colors);
@each $color in $colors {
$i: index($colors, $color);
&:nth-child(#{$length + "n+" + $i}) {
border-color: $color;
&::before {
border-color: $color;
}
}
}
}