title: Prevent CSS inheritance to children of the selected element
body: <p>I have a menu consisting of nested ULs and LIs, eg:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.wrapper &gt; ul:first-child &gt; li:last-child {
    color: red;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="wrapper"&gt;
    &lt;ul&gt;
      &lt;li&gt;Lorem&lt;/li&gt;
      &lt;li&gt;Ipsum&lt;/li&gt;
      &lt;li&gt;Dolar&lt;/li&gt;
      &lt;li&gt;Style me!
        &lt;ul&gt;
          &lt;li&gt;Lorem&lt;/li&gt;
          &lt;li&gt;Don't style me!&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want to add a style to the last <code>&lt;li&gt;</code> of the first <code>&lt;ul&gt;</code>, but not have it's children (the nested <code>&lt;ul&gt;</code>) inherit it.</p>
  
  <p>I have tried:</p>
  
  <pre class="lang-css prettyprint-override"><code>.wrapper &gt; ul:first-child &gt; li:last-child {/*styles*/}
  </code></pre>
  
  <p>but this still styles the last element.</p>
  
  <p>Would anyone know how I can target just that 1 element (with just CSS)?</p>