Repository navigation
Expand file tree
/
Copy pathcss3-modsel-147a.xml
More file actions
52 lines (52 loc) · 2.36 KB
/
Copy pathcss3-modsel-147a.xml
File metadata and controls
52 lines (52 loc) · 2.36 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
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>:nth-last-of-type() pseudo-class with collapsed elements</title>
<style type="text/css"><![CDATA[
line { display: block; }
[type~=match] { background: red; }
line:nth-last-of-type(3n-1) { background: lime; }
[hidden] { visibility: collapse; }
]]></style>
<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 -->
<meta name="flags" content=" namespace" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="common.js"></script>
</head>
<body>
<test xmlns="http://www.example.org/">
<line id="u1" type="">This line should be unstyled.</line>
<line id="t1" type="match">This line should be green.</line>
<line id="u2" type="">This line should be unstyled.</line>
<line id="u3" type="">This line should be unstyled.</line>
<line id="t2" type="match">This line should be green.</line>
<line id="u4" type="">This line should be unstyled.</line>
<line id="u5" type="">This line should be unstyled.</line>
<line id="t3" type="match" hidden="hidden">This line should be green.</line>
<line id="u6" type="" hidden="hidden">This line should be unstyled.</line>
<line id="u7" type="">This line should be unstyled.</line>
<line id="t4" type="match">This line should be green.</line>
<line id="u8" type="">This line should be unstyled.</line>
<line id="u9" type="">This line should be unstyled.</line>
<line id="t5" type="match">This line should be green.</line>
<line id="u10" type="" hidden="hidden">This line should be unstyled.</line>
<line id="u11" type="">This line should be unstyled.</line>
<line id="t6" type="match">This line should be green.</line>
<line id="u12" type="">This line should be unstyled.</line>
<line id="u13" type="">This line should be unstyled.</line>
<line id="t7" type="match">This line should be green.</line>
<line id="u14" type="">This line should be unstyled.</line>
</test>
<script><![CDATA[
test(function() {
for (let i = 1; i <= 7; ++i) {
assert_background_color(`t${i}`, LIME);
}
for (let i = 1; i <= 14; ++i) {
assert_not_background_color(`u${i}`, LIME);
}
}, 'nth-last-of-type() pseudo-class with collapsed elements');
]]></script>
</body>
</html>