title: How to select nth-child in SASS within a nested selectors
body: <p>Is there a way not to repeat the clip-item class when using nth-child in a nested SCSS? The output should be in the CSS below.</p>
  
  <p>CSS</p>
  
  <pre><code>.clip-item .group-left {
    padding: 0;
  }
  .clip-item .group-left:nth-child(2n+1) {
    background: blue;
  }
  .clip-item .group-left:nth-child(2n+2) {
    background: gray;
  }
  .clip-item .group-right {
    padding: 0;
  }
  .clip-item .group-right:nth-child(2n+1) {
    background: blue;
  }
  .clip-item .group-right:nth-child(2n+2) {
    background: gray;
  }
  </code></pre>
  
  <p>I was trying to do it like below. Even though t's working, I don't think it's the right way / clean way.</p>
  
  <p>SCSS</p>
  
  <pre><code>.group-left {
    .clip-item &amp; {
      padding: 0;
    }
    .clip-item:nth-child(2n+1) &amp; {
      background: blue;
    }
    .clip-item:nth-child(2n+2) &amp; {
      background: gray;
    }
  }
  
  .group-right {
    .clip-item &amp; {
      padding: 0;
    }
    .clip-item:nth-child(2n+1) &amp; {
      background: blue;
    }
    .clip-item:nth-child(2n+2) &amp; {
      background: gray;
    }
  }
  </code></pre>
  
  <p>I'm also using the .group-left and .group-right classes in some content, that's why I used it as a parent selector.</p>
  
  <p>EDIT:-
  Each group wrappers are wrapped in a clip-item div. Below is my markup:-</p>
  
  <pre><code>&lt;div class="clip-item"&gt;
    &lt;div class="group-left"&gt;
    &lt;div class="group-right"&gt;
  &lt;/div&gt;
  
  &lt;div class="clip-item"&gt;
    &lt;div class="group-left"&gt;
    &lt;div class="group-right"&gt;
  &lt;/div&gt;
  </code></pre>