css3-selectors-lang-050

[lang="en-GB"], lang="en-US"

WeasyPrint

This browser

Flags
script

Source

 1 <!DOCTYPE html>
 2 <html lang="en"><head>
 3 <meta charset="utf-8">
 4 <title>[lang="en-GB"], lang="en-US"</title>
 5 <link href="mailto:ishida@w3.org" rel="author" title="Richard Ishida">
 6 <link href="http://www.w3.org/TR/css3-selectors/#attribute-selectors" rel="help">
 7 <script src="/resources/testharness.js"></script>
 8 <script src="/resources/testharnessreport.js"></script>
 9 <style type="text/css">
10 .test div { width: 50px; }
11 #box[lang='en-GB'] { width: 100px; }
12 </style>
13 </head>
14 <body>
15 
16 
17 
18 <div class="test"><div lang="en-US" id="box">&nbsp;</div></div>
19 
20 
21 <script>
22 test(function() {
23 assert_equals(document.getElementById('box').offsetWidth, 50);
24 }, "A lang= value and a lang attribute value will NOT match if their region subtags differ.");
25 </script>
26 
27 <div id="log"></div>
28 
29 
30 
31 </body></html>