white-space-pre-wrap-trailing-spaces-001.html (918B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>CSS Text test: alignement and 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-001-ref.html"> 7 <meta name="assert" content="Preserved white space with pre-wrap at the end of a line ending with a forced line break conditionally hangs, so it does affect alignment."> 8 9 <style> 10 div { 11 white-space: pre-wrap; 12 font-family: monospace; 13 } 14 div:nth-of-type(2) { 15 width: 7ch; 16 text-align: right; 17 } 18 div:nth-of-type(3), 19 div:nth-of-type(4) { 20 width: 9ch; 21 text-align: center; 22 } 23 </style> 24 25 <p>This test passes if the 4 letters below are verticaly aligned. 26 27 <div> P</div> 28 <div>A </div> 29 <div> S </div> 30 <div> S </div>