<!DOCTYPE html>
<meta charset="utf-8" />
<title>CSS Selectors Invalidation: :nth-child(... of S) with ancestor in S</title>
<link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org">
<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index">
<div>
  <div>
    <div>
      <div style="color: green">Should be green</div>
    </div>
  </div>
</div>
