swightwick
8/18/2017 - 3:11 PM

Sass gradient list mixin

Sass gradient list mixin

ul{
$color-1: #1D2671;
$color-2: #222;
$steps: 20; /* change to amount of list items */
@for $i from 0 to $steps {
   & li:nth-child(#{$i}) i {
        color: mix($color-1, $color-2, percentage($i / ($steps - 1)));
    }
  }
}