case-sensitive-003

Case-sensitivity of pseudo-classes and pseudo-elements

WeasyPrint

This browser

Assertion
Pseudo-class and pseudo-element names are ASCII case-insensitive.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3  <head>
 4   <title>CSS Test: Case-sensitivity of pseudo-classes and pseudo-elements</title>
 5   <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/">
 6   <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters">
 7   <meta name="assert" content="Pseudo-class and pseudo-element names are ASCII         case-insensitive.">
 8   <style type="text/css">
 9     * { color: red; }
10     *:before, *:after { color: red; }
11 
12     p:FiRSt-cHIlD {
13       color: green;
14     }
15 
16     :LinK, :viSiTed {
17       color: green;
18       text-decoration: none;
19       font: inherit;
20     }
21 
22     :lAnG(en) {
23       color: green;
24     }
25 
26     .flin {
27       white-space: nowrap;
28     }
29     .flin:fIrsT-LinE {
30       color: green;
31     }
32 
33     .flet span {
34       color: green;
35     }
36     .flet:fIRst-LEttEr {
37       color: green;
38     }
39 
40     .bef:before, .af:after {
41       content: "This sentence must be green.";
42     }
43     .bef:BeFoRe, .af:aFtEr {
44       color: green;
45     }
46 
47     /* test for ASCII (not UNICODE) case-insensitivity */
48     p:fİrst-child {
49       color: red;
50     }
51     p:fırst-child {
52       color: red;
53     }
54     :linK {
55       color: red;
56     }
57   </style>
58 
59  </head>
60  <body>
61    <p>This sentence must be green.</p>
62    <p><a href="">This sentence must be green.</a></p>
63    <p><a href="unvisited:link">This sentence must be green.</a></p>
64    <p lang="en">This sentence must be green.</p>
65    <p class="flin">This sentence must be green.</p>
66    <p class="flet">T<span>his sentence must be green.</span></p>
67    <p class="bef"></p>
68    <p class="af"></p>
69  </body>
70 </html>