blob: 2db514ccba885da9710ca4238db884bfa18ed90b [file] [log] [blame]
<!doctype html>
<html>
<head>
<style>
target {
display: block;
margin: 2px;
}
</style>
</head>
<body>
<p>This test the specificity of :nth-child() with dynamic specificity. If the test pass, the style of each line should match its text description.</p>
<div>
<target style="background-color: white; color: black; border: none;">Black text on white background.</target>
<target style="background-color: red; color: white; border: 5px solid purple;">White text on red background with a purple border.</target>
<target style="background-color: green; color: red; border: none;">Red text on green background.</target>
<target style="background-color: green; color: white; border: 5px solid purple;">White text on green background with a purple border.</target>
<target style="background-color: white; color: black; border: 5px solid blue;">Black text on white background with a blue border.</target>
<target style="background-color: red; color: white; border: 5px solid purple;">White text on red background with a purple border.</target>
<target style="background-color: green; color: red; border: 5px solid blue;">Red text on green background with a blue border.</target>
<target style="background-color: red; color: white; border: 5px solid purple;">White text on red background with a purple border.</target>
</div>
</body>
</html>