title: Trying to understand Child combinator in CSS
body: <p>I want to style just the first level of <code>li</code>, it looks like a child combinator should work, but as the demo below shows every <code>li</code> is red. I would expect only the first level (not nested) <code>li</code> to be styled red.</p>
  
  <p>What am I doing wrong?</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>.list &gt; li {
    color: red;
    border: 1px solid orange;
    list-style: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul class="list"&gt;
    &lt;li&gt;1st level&lt;/li&gt;
    &lt;li&gt;1st level&lt;/li&gt;
    &lt;li&gt;1st level
        &lt;ul&gt;
            &lt;li&gt;2nd level&lt;/li&gt;
            &lt;li&gt;2nd level&lt;/li&gt;
            &lt;li&gt;2nd level&lt;/li&gt;
            &lt;li&gt;2nd level&lt;/li&gt;
            &lt;li&gt;2nd level&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;1st level&lt;/li&gt;
    &lt;li&gt;1st level&lt;/li&gt;
  &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>