line-breaking-004.html (944B)
1 <!doctype html> 2 <html> 3 <meta charset="utf-8"> 4 <title>CSS Text — line breaking sanity check 3</title> 5 <meta name=assert content="sanity check: an unstyled span should not affect line breaking"> 6 <link rel=help href="https://www.w3.org/TR/css-text-3/#line-break-details"> 7 <link rel=match href="reference/line-breaking-001-ref.html"> 8 <link rel=author title="Florian Rivoal" href="http://florian.rivoal.net"> 9 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 10 <style> 11 div { 12 color:green; 13 width: 1em; 14 line-height: 1em; 15 font-family: Ahem; 16 white-space: normal; 17 font-size: 20px; 18 } 19 .container { 20 position: relative; 21 } 22 .fail { 23 color: red; 24 position: absolute; 25 left: 0; 26 top: 1em; 27 z-index: -1; 28 } 29 </style> 30 <body> 31 <p>There should be a green rectangle and no red.</p> 32 <div class=container> 33 <div>X​<span>X<span></div> 34 <div class=fail>X</div> 35 </div> 36 </body> 37 </html>