summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/selectors/nth-last-child-of-nesting.html
blob: e1ce3ce2038f33640c32bf11d7064273bd922e4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!doctype html>
<html>
<head>
<title>:nth-last-child nesting</title>
<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index">
<link rel=author href="mailto:zach@zrhoffman.net" title="Zach Hoffman">
<link rel="match" href="nth-child-of-nesting-ref.html">
<style>
:nth-last-child(2n - 2 of :nth-last-child(n of .target)) {
    background-color: lime;
}
</style>
</head>
<body>
    <p>White</p>
    <p class="target">Green</p>
    <p>White</p>
    <p class="target">White</p>
    <p>White</p>
    <p class="target">Green</p>
    <p>White</p>
    <p class="target">White</p>
    <p>White</p>
    <p class="target">Green</p>
    <p>White</p>
    <p class="target">White</p>
</body>
</html>