-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Expand file tree
/
Copy pathcss3-modsel-77b.xml
More file actions
52 lines (51 loc) · 1.88 KB
/
Copy pathcss3-modsel-77b.xml
File metadata and controls
52 lines (51 loc) · 1.88 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>NEGATED :first-child pseudo-class</title>
<style type="text/css"><![CDATA[.green { background-color : lime ! important }
.t1 td:not(:first-child) { background-color : red }
p > *:not(:first-child) { background-color : red }
table.t1 td { border : thin black solid }
]]></style>
<link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
<link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="common.js"></script>
</head>
<body>
<div>
<table class="t1" border="1">
<tr>
<td id="first1">1.1</td>
<td id="green1" class="green">green cell</td>
<td id="green2" class="green">green cell</td>
</tr>
<tr>
<td id="first2">2.1</td>
<td id="green3" class="green">green cell</td>
<td id="green4" class="green">green cell</td>
</tr>
<tr>
<td id="first3">3.1</td>
<td id="green5" class="green">green cell</td>
<td id="green6" class="green">green cell</td>
</tr>
</table>
</div>
<p>This paragraph <span id="span1">should be</span> unstyled.</p>
<script><![CDATA[
test(function() {
const greenElements = ['green1', 'green2', 'green3', 'green4', 'green5', 'green6'];
greenElements.forEach(function(id) {
assert_background_color(id, LIME, `${id} should be green`);
});
const notRedElements = ['first1', 'first2', 'first3', 'span1'];
notRedElements.forEach(function(id) {
assert_not_background_color(id, RED, `${id} should not be red`);
});
}, 'NEGATED :first-child pseudo-class');
]]></script>
</body>
</html>