case-sensitive-004

Case-sensitivity of :lang() arguments

WeasyPrint

This browser

Assertion
The argument to :lang() is 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 :lang() arguments</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="The argument to :lang() is ASCII case-insensitive.">
 8   <style type="text/css">
 9     .test-folding { color: red; }
10 
11     :lang(en) {
12       color: green;
13     }
14     :lang(FR) {
15       color: green;
16     }
17 
18     /* test for ASCII (not UNICODE) case-insensitivity */
19     .test-unicode { color: green; }
20     :lang() {
21       color: red;
22     }
23     :lang() {
24       color: red;
25     }
26     :lang(Kl) {
27       color: red;
28     }
29   </style>
30 
31  </head>
32  <body>
33   <div class="test-folding">
34    <p lang="En">This sentence must be green.</p>
35    <p lang="eN">This sentence must be green.</p>
36    <p lang="fr">This sentence must be green.</p>
37    <p lang="fR">This sentence must be green.</p>
38   </div>
39   <div class="test-unicode">
40    <p lang="kl">This sentence must be green.</p>
41    <p lang="KL">This sentence must be green.</p>
42    <p lang="fi">This sentence must be green.</p>
43    <p lang="FI">This sentence must be green.</p>
44   </div>
45  </body>
46 </html>