pre-wrap-018.html (931B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Text level 3 Test: pre-wrap spaces and centering</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-018-ref.html"> 7 <meta name="assert" content="conditionally hanging white space at the end of lines with forced breaks provides symmetry with the start of the line"> 8 <style> 9 div { 10 font-size: 2rem; 11 margin: 1rem; 12 } 13 #test { 14 white-space: pre-wrap; 15 width: 5ch; 16 border: solid 1px; 17 font-family: monospace; 18 text-align: center; 19 text-decoration: underline; 20 } 21 22 #ref { 23 white-space: pre; 24 width: 5ch; 25 border: solid 1px; 26 font-family: monospace; 27 } 28 #ref span { 29 text-decoration: underline; 30 } 31 32 </style> 33 34 <p>Test passes if the two boxes below are identical. 35 36 <div id=test> 0 </div> 37 <div id=ref> <span> 0 </span></div>