pre-wrap-014.html (1092B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Text level 3 Test: preserved white space at the end of soft-wrapped lines and white-space:pre-wrap with justification</title> 4 <link rel="author" title="Florian Rivoal" href="http://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/pre-wrap-014-ref.html"> 7 <meta name="assert" content="When white-space is pre-wrap, spaces at the end of soft-wrapped lines hang, so they do not have any effect when justifying."> 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 height: 1em; 15 white-space: pre-wrap; 16 17 color: transparent; 18 background: red; 19 20 width: 4ch; 21 text-align: justify; 22 } 23 span { 24 color: green; 25 background: green; 26 } 27 </style> 28 <body> 29 <p>Test passes if there is a <strong>filled green rectangle</strong> and <strong>no red</strong>.</p> 30 <div><span>X X</span> X</div> 31 <!-- invisible last line, because justification works on non-last lines--> 32 </body>