css3-modsel-146b.xml (1808B)
1 <html xmlns="http://www.w3.org/1999/xhtml"> 2 <head> 3 <title>:nth-child() pseudo-class with hidden elements</title> 4 <style type="text/css"><![CDATA[ 5 line { display: block; } 6 [type~=match] { background: lime ! important; } 7 line:nth-child(3n-1) { background: red; } 8 [hidden] { display: none; } 9 ]]></style> 10 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 11 <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found --> 12 <meta name="flags" content=" namespace" /> 13 </head> 14 <body> 15 <test xmlns="http://www.example.org/"> 16 <line type="">This line should be unstyled.</line> 17 <line type="match">This line should be green.</line> 18 <line type="">This line should be unstyled.</line> 19 <line type="">This line should be unstyled.</line> 20 <line type="match">This line should be green.</line> 21 <line type="">This line should be unstyled.</line> 22 <line type="" hidden="hidden">This line should be unstyled.</line> 23 <line type="match">This line should be green.</line> 24 <line type="">This line should be unstyled.</line> 25 <line type="">This line should be unstyled.</line> 26 <line type="match">This line should be green.</line> 27 <line type="">This line should be unstyled.</line> 28 <line type="" hidden="hidden">This line should be unstyled.</line> 29 <line type="match" hidden="hidden">This line should be green.</line> 30 <line type="">This line should be unstyled.</line> 31 <line type="">This line should be unstyled.</line> 32 <line type="match">This line should be green.</line> 33 <line type="">This line should be unstyled.</line> 34 <line type="">This line should be unstyled.</line> 35 <line type="match">This line should be green.</line> 36 <line type="">This line should be unstyled.</line> 37 </test> 38 </body> 39 </html>