title: selector last element wrapped by parent
body: <p>I am trying to access the last <code>.icon</code> element in the DOM.  I have tried .icon:last-of-type or .icon:last-child, but it does not work. Do not use .wrap:last-child because it has many .wrap below it does not have .icon.  I want to change the color of the last icon.  For example:</p>
  
  <pre><code>&lt;div class="wrap"&gt;
    &lt;div class="item"&gt;
      &lt;div class="icon"&gt;0000000&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="wrap"&gt;
    &lt;div class="item"&gt;
      &lt;div class="icon"&gt;0000000&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="wrap"&gt;
    &lt;div class="item"&gt;
      &lt;div class="icon"&gt;0000000&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="wrap"&gt;
    &lt;div class="item"&gt;
      &lt;div class="other-icon"&gt;0000000&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>