title: SASS Looping Selector
body: <p>I have got this repetitive selector as shown below:</p>
  
  <pre><code>// Level 1
  .wrap &gt; ul &gt; li {
    background: green;
  }
  
  // Level 2 
  .wrap &gt; ul &gt; li &gt; ul &gt; li {
    background: orange;
  }
  
  // Level 3 
  .wrap &gt; ul &gt; li &gt; ul &gt; li &gt; ul &gt; li {
    background: red;
  }
  
  // Level 4 
  .wrap &gt; ul &gt; li &gt; ul &gt; li &gt; ul &gt; li &gt; ul &gt; li {
    background: light-red;
  }
  
  // Level 5 
  .wrap &gt; ul &gt; li &gt; ul &gt; li &gt; ul &gt; li &gt; ul &gt; li &gt; ul &gt; li{
    background: salmon;
  }
  </code></pre>
  
  <p>Is there a way I can create a sass function so I can just specify the depth and color like this</p>
  
  <pre><code> **for example** 
   @include depth(5) { background: salmon })
  </code></pre>
  
  <p>I would appreciate your help :)</p>