first-line-pseudo-014.xht (1588B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> 3 <head> 4 <title>CSS Test: vertical-align: top on :first-line</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="reviewer" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-10-06 --> 7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/block/first-line/014.html" type="text/html"/> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo" /> 9 <link rel="match" href="first-line-pseudo-013-ref.xht" /> 10 11 <meta name="flags" content="ahem may" /> 12 13 <!-- 14 vertical-align may apply to :first-line selector but is not required by the spec. 15 More info: 16 http://lists.w3.org/Archives/Public/public-css-testsuite/2013Oct/0000.html 17 --> 18 19 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 20 <style type="text/css"> 21 p#expected-results {margin: 3px;} 22 p { margin: 0.2em; } 23 .control, .test { font: 3.75em/1 Ahem; color: green; } 24 .first-line, .test:first-line { background: red; vertical-align: top; } 25 .inner { font-size: 1.25em; vertical-align: top; } 26 </style> 27 </head> 28 <body> 29 <p id="expected-results">Test passes if there are 2 green filled green rectangles and <strong>no red</strong>.</p> 30 <p class="control"><span class="first-line">X<span class="inner">É</span>X</span></p> 31 <p class="test">X<span class="inner">É</span>X</p> 32 </body> 33 </html>