vertical-align-computed.html (1389B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Inline Layout: getComputedStyle().verticalAlign</title> 6 <link rel="help" href="https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align"> 7 <link rel="help" href="https://drafts.csswg.org/css-inline/#propdef-vertical-align"> 8 <meta name="assert" content="vertical-align computed value is as specified, with lengths made absolute."> 9 <script src="/resources/testharness.js"></script> 10 <script src="/resources/testharnessreport.js"></script> 11 <script src="/css/support/computed-testcommon.js"></script> 12 <style> 13 #target { 14 font-size: 40px; 15 } 16 </style> 17 </head> 18 <body> 19 <div id="target"></div> 20 <script> 21 test_computed_value("vertical-align", "baseline"); 22 test_computed_value("vertical-align", "sub"); 23 test_computed_value("vertical-align", "super"); 24 test_computed_value("vertical-align", "top"); 25 test_computed_value("vertical-align", "text-top"); 26 test_computed_value("vertical-align", "middle"); 27 test_computed_value("vertical-align", "bottom"); 28 test_computed_value("vertical-align", "text-bottom"); 29 test_computed_value("vertical-align", "-10px"); 30 test_computed_value("vertical-align", "20%"); 31 test_computed_value("vertical-align", "calc(20% + 10px)"); 32 test_computed_value("vertical-align", "calc(10px - 0.5em)", "-10px"); 33 34 // TODO: Test against the CSS Inline Layout grammar when browsers support it. 35 </script> 36 </body> 37 </html>