attr-length-valid.html (810B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title> 6 CSS Values and Units Test: 7 Attribute references (length) 8 </title> 9 <meta name="assert" content=" 10 The value of referenced attribute is used correctly as a length. 11 " /> 12 13 <link 14 rel="author" 15 title="François REMY" 16 href="mailto:fremycompany.developer@yahoo.fr" 17 / > 18 19 <link rel="help" href="http://www.w3.org/TR/css3-values/#attr-notation"/> 20 21 <link 22 rel="match" 23 href="reference/200-200-green.html" 24 /> 25 26 <style type="text/css"> 27 28 html, body { margin: 0px; padding: 0px; } 29 30 html { background: white; overflow: hidden; } 31 #outer { position: relative; background: green; } 32 33 #outer { width: attr(data-test type(<length>)); height: 200px; } 34 35 </style> 36 37 </head> 38 <body> 39 40 <div id="outer" data-test="200px"></div> 41 42 </body> 43 </html>