title: css find closest item
body: <p>I have a nested structure that contains the same elements. To only target the elements within the current set I do something like this:</p>
  
  <pre><code>.set1 &gt; .content &gt; .trigger {
    background: red;
  }
  </code></pre>
  
  <p>In real life this selector has much more elements. While it works, if I change the name or depth on one of the elements it will no longer work.</p>
  
  <p>Is there a way to just find the <code>.trigger</code> (in this case) of the current set?</p>
  
  <pre><code>&lt;div class="set set1"&gt;
    &lt;div class="content"&gt;
      &lt;div class="trigger"&gt;&lt;/div&gt;
      &lt;div class="set set2"&gt;
        &lt;div class="content"&gt;
          &lt;div class="trigger"&gt;&lt;/div&gt;
        &lt;/div&gt;
      &lt;div&gt;
    &lt;/div&gt;
  &lt;div&gt;
  </code></pre>