title: @each loop with index
body: <p>I was wondering if you can get an element index for the @each loop.</p>
  
  <p>I have the following code, but I was wondering if the <code>$i</code> variable was the best way to do this.</p>
  
  <p>Current code:</p>
  
  <pre><code>$i: 0;
  $refcolors: #55A46A, #9BD385, #D9EA79, #E4EE77, #F2E975, #F2D368, #F0AB55, #ED7943, #EA4E38, #E80D19;
  
  @each $c in $refcolors {
      $i: $i + 1;
      #cr-#{$i} strong {
          background:$c;
      }   
  }
  </code></pre>