first-line-pseudo-013

vertical-align: top on :first-line

WeasyPrint

This browser

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html 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="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/block/first-line/013.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo">
 8   <style type="text/css">
 9   .ahem { display: inline; font: 1em/1 Ahem, sans-serif; background: red; color: white; }
10   p { margin: 0.2em; }
11   .control, .test { font: 4em/1 Ahem; color: green; }
12   .first-line, .test:first-line { background: red; vertical-align: top; }
13   .inner { font-size: 1.25em; vertical-align: bottom; }
14   </style>
15  </head>
16  <body>
17   <div class="ahem">Ahem_font_required_for_this_test.</div>
18   <p>There should be two unbroken lines of green below.</p>
19   <p class="control"><span class="first-line">X<span class="inner">&Eacute;</span>X</span></p>
20   <p class="test">X<span class="inner">&Eacute;</span>X</p>
21  </body>
22 </html>