Status: FAIL | Duration: 19ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/CSS2/linebox/vertical-align-117a.xht
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CSS Test: 'vertical-align: text-bottom' - line-height</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading" title="Section 10.8.1 Leading and half-leading" /> <link rel="match" href="vertical-align-117a-ref.xht" /> <meta content="ahem" name="flags" /> <meta content="For inline non-replaced elements (such as the span element in this testcase), the box used for vertical-alignment is the box whose height is the 'line-height' (containing the box's glyphs and the half-leading on each side). 'vertical-align: text-bottom' will align the bottom of such box with the bottom of the parent's content area and not with the bottom of the parent's box." name="assert" /> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <style type="text/css"><![CDATA[ div { background-color: yellow; /* The sole purpose for such yellow background is to help delimit and visually identify the content area of the block container box. */ font: 2.5em/3.25 Ahem; /* equivalent to font: 40px/130px (with top-half-leading and bottom-half-leading each equal to 45px) but entirely font-size-relative and perfectly text-size-scalable in all browsers */ } span { color: blue; margin: auto -1em; vertical-align: text-bottom; } ]]></style> </head> <body> <p>Test passes if the blue stripe is vertically offset <strong>above the black stripes on both sides</strong>. The blue stripe must be clearly and entirely above the black stripes.</p> <div>TTTT<span>MustBeAbove</span>TTTT</div> </body> </html>
/css/CSS2/linebox/vertical-align-117a-ref.xht
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CSS Reftest Reference</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <style type="text/css"><![CDATA[ div { background-color: yellow; height: 175px; position: relative; } img {position: absolute;} img#first-black { left: 0px; top: 90px; } img#second-blue { left: 120px; top: 45px; } img#third-black { left: 520px; top: 90px; } ]]></style> </head> <body> <p>Test passes if the blue stripe is vertically offset <strong>above the black stripes on both sides</strong>. The blue stripe must be clearly and entirely above the black stripes.</p> <div><img id="first-black" src="../support/black15x15.png" width="160" height="40" alt="Image download support must be enabled" /><img id="second-blue" src="../support/blue15x15.png" width="440" height="40" alt="Image download support must be enabled" /><img id="third-black" src="../support/black15x15.png" width="160" height="40" alt="Image download support must be enabled" /> </div> </body> </html>