title: first-child seems to be not consistent
body: <p>I want to select all <code>span</code> elements that are descendants of element <code>li:first-child</code> and element <code>a</code>.</p>
  
  <p>Under <em>Menu 1</em>, my selector also selects <em>sub-menu 1.7 and 1.8</em>, but under <em>Menu 2</em> it works as expected. However, <em>Menu 1</em> and <em>Menu 2</em> have the same structure.</p>
  
  <p>Thank you.
  Andy. </p>
  
  <p>My fiddle: <a href="http://jsfiddle.net/dedyandy/kmLxrgyn/1/" rel="nofollow noreferrer">http://jsfiddle.net/dedyandy/kmLxrgyn/1/</a></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>.small-nav-dropdown-menu li:first-child a span {
    color: #000;
  }
  
  ul {
    list-style: none;
  }
  
  span {
    color: #fff;
    font-weight: bold;
  }
  
  .main-nav-dropdown-item-text {
    display: block;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 1rem;
    text-transform: uppercase;
    color: #fff;
    font-weight: bold;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;title&gt;Title&lt;/title&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;link rel="shortcut icon" href="favicon.gif" type="image/x-icon" /&gt;
    &lt;link rel="icon" href="favicon.gif" type="image/xIicon" /&gt;
    &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"&gt;
    &lt;link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css" integrity="sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ" crossorigin="anonymous"&gt;
    &lt;link href="https://fonts.googleapis.com/css?family=Lato:400,700&amp;display=swap" rel="stylesheet"&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"&gt;&lt;/script&gt;
    &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"&gt;&lt;/script&gt;
    &lt;script src="https://kit.fontawesome.com/de6f7ac358.js" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div class="small-nav-dropdown-menu"&gt;      
    &lt;ul style="background-color: rgb(36, 204, 151);"&gt;
      &lt;li&gt;
        &lt;a href="#"&gt;
          &lt;span style="color: #fff"&gt;Menu 1&lt;/span&gt;
        &lt;/a&gt;
        &lt;ul style="background-color: #00bc92;"&gt;
          &lt;li&gt;
            &lt;a href="#"&gt;
              &lt;span class="main-nav-dropdown-item-text"&gt;1.1&lt;/span&gt;
            &lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="#" class="main-nav-dropdown-item-text"&gt;1.2&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="#" class="main-nav-dropdown-item-text"&gt;1.3&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="#" class="main-nav-dropdown-item-text"&gt;1.4&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="#" class="main-nav-dropdown-item-text"&gt;1.5&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="#" class="main-nav-dropdown-item-text"&gt;1.6&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="#"&gt;
              &lt;span class="main-nav-dropdown-item-text"&gt;1.7&lt;/span&gt;
            &lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a&gt;
              &lt;span class="main-nav-dropdown-item-text"&gt;1.8&lt;/span&gt;
            &lt;/a&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;a href="#"&gt;
          &lt;span style="color: #fff"&gt;Menu 2&lt;/span&gt;
        &lt;/a&gt;
        &lt;ul style="background-color: #00bc92;"&gt;
          &lt;li&gt;
            &lt;a href="#"&gt;
              &lt;span class="main-nav-dropdown-item-text"&gt;2.1&lt;/span&gt;
            &lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="#" class="main-nav-dropdown-item-text"&gt;2.2&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="#" class="main-nav-dropdown-item-text"&gt;2.3&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="#" class="main-nav-dropdown-item-text"&gt;2.4&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="#" class="main-nav-dropdown-item-text"&gt;2.5&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="#"&gt;
              &lt;span class="main-nav-dropdown-item-text"&gt;2.6&lt;/span&gt;
            &lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="#"&gt;
              &lt;span class="main-nav-dropdown-item-text"&gt;2.7&lt;/span&gt;
            &lt;/a&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>