Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/selectors/nth-of-selector-before.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Selectors Test: :nth-child(N of S) with ::before</title>
<link rel="match" href="/css/reference/pass_if_pass_below.html">
<style>
.pass:nth-child(2 of .item)::before {
content: "PASS";
}
</style>
<p>Test passes if there is the word "PASS" below.</p>
<div>
<span class="item"></span>
<span class="item pass"></span>
</div>