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;
}
}
}
}
More than 5 years have passed since last update.
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;
}
}
}
}
Register as a new user and use Qiita more conveniently