baseline-inline-replaced-002.xht (1674B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 5 <head> 6 7 <title>CSS Writing Modes Test: baseline-alignment of inline replaced element and 'vertical-rl'</title> 8 9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> 10 <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#replaced-baselines" title="4.3 Atomic Inline Baselines" /> 11 <link rel="match" href="baseline-inline-replaced-002-ref.xht" /> 12 13 <meta content="ahem image" name="flags" /> 14 <meta content="This test checks that the baseline-alignment of an image in the line box of a block with 'writing-mode' set to 'vertical-rl' is 'central' and not 'alphabetic'." name="assert" /> 15 16 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 17 <style type="text/css"><![CDATA[ 18 div 19 { 20 background-color: red; 21 font: 96px/1 Ahem; /* computes to 96px/96px */ 22 height: 99px; /* the height of the cat image */ 23 writing-mode: vertical-rl; 24 } 25 26 img 27 { 28 vertical-align: baseline; 29 } 30 /* In vertical writing mode, the central baseline is used as the dominant baseline; 31 here, the central baseline is assumed to be halfway between the under and over 32 logical margin edges of the inline replaced element box. */ 33 34 /* cat.png has an intrinsic height of 99px and an intrinsic width of 98px */ 35 ]]></style> 36 </head> 37 38 <body> 39 40 <p>Test passes if there is a cat and <strong>no red</strong>.</p> 41 42 <div><img src="support/cat.png" alt="Image download support must be enabled" /></div> 43 44 </body> 45 </html>