Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
52 lines (52 loc) · 2.33 KB

File metadata and controls

52 lines (52 loc) · 2.33 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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-child() pseudo-class with hidden elements</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="common.js"></script>
<style type="text/css"><![CDATA[
line { display: block; }
[type~=match] { background: lime ! important; }
line:nth-child(3n-1) { background: red; }
[hidden] { display: none; }
]]></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" />
</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="" hidden="hidden">This line should be unstyled.</line>
<line id="t3" type="match">This line should be green.</line>
<line id="u6" type="">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="" hidden="hidden">This line should be unstyled.</line>
<line id="t5" type="match" hidden="hidden">This line should be green.</line>
<line id="u10" type="">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-child with hidden elements');
]]></script>
</body>
</html>
Morty Proxy This is a proxified and sanitized view of the page, visit original site.