<!doctype html>
<html>
<head>
<title>:nth-child with selector list specificity</title>
<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index">
<link rel="match" href="nth-child-specificity-4-ref.html">
<style>
    /* (1, 2, 1) */
    :nth-child(even of target.foo, .foo#bar, target.foo#bar, target#bar) {
        background-color: red;
        color: white;
        border: 5px solid purple;
    }

    /* (0, 1, 1) */
    target.foo {
        color: red;
    }
    /* (0, 2, 1) */
    target.