css3-selectors-lang-046

[lang="es-MX"], lang="es"

WeasyPrint

This browser

Flags
script

Source

 1 <!DOCTYPE html>
 2 <html lang="en"><head>
 3 <meta charset="utf-8">
 4 <title>[lang="es-MX"], lang="es"</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='es-MX'] { width: 100px; }
12 </style>
13 </head>
14 <body>
15 
16 
17 
18 <div class="test"><div lang="es" id="box">&nbsp;</div></div>
19 
20 
21 <script>
22 test(function() {
23 assert_equals(document.getElementById('box').offsetWidth, 50);
24 }, "A lang= value will NOT match a lang attribute value when the former contains more subtags.");
25 </script>
26 
27 <div id="log"></div>
28 
29 
30 
31 </body></html>