imarkdesigns
12/24/2017 - 9:06 PM

SaSS using @each loop and list #sass

SaSS using @each loop and list #sass

$colors-list: #3b5999 #55acee #e4405f #cd201f #dd4b39;
@each $bg-color in $colors-list {
  $i: index($colors-list, $bg-color);
  li:not(:last-child):nth-child(#{$i}) a {
    background: $bg-color;
    @include square(32px);
  }
}