white-space-pre-wrap-trailing-spaces-002.html (1190B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>CSS Text test: intrinsic maximum sizing and alignment of trailing spaces with white-space:pre-wrap</title> 4 <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> 5 <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> 6 <link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-002-ref.html"> 7 <meta name="assert" content="Preserved white space with white-space is pre-wrap at the end of the line before a forced-break only hangs conditionally, and therefore is included in the max-content size, and taken into account for alignemnt (since it doesn't actually hang in this situation)."> 8 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 9 <style> 10 div { 11 font-size: 20px; 12 font-family: Ahem; 13 line-height: 1em; 14 white-space: pre-wrap; 15 } 16 span { 17 display: inline-block; 18 } 19 #s1 { text-align: right; } 20 #s2 { text-align: center; } 21 #test { color: orange; } 22 #ref { color: blue; } 23 </style> 24 25 <p>This test passes if the orange blocks below are vertically aligned with the blue ones. 26 27 <div id=test><span id=s1>X </span><span id=s2> X </span> X X</div> 28 <div id=ref>X X X X</div>