text-justify-and-trailing-spaces-001.html (983B)
1 <!DOCTYPE html> 2 <html lang="en" > 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS text tests: How trailing spaces affect text-justify </title> 6 <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> 7 <link rel='help' href='https://drafts.csswg.org/css-text-3/#text-justify-property'> 8 <link rel='match' href='reference/text-justify-and-trailing-spaces-001-ref.html'> 9 <link rel='match' href='reference/text-justify-and-trailing-spaces-alt-001-ref.html'> 10 <meta name="assert" content="The text in the first line is correctly justified, leaving aside the trailing space, which must hang or be removed."> 11 <style> 12 .test { 13 width: 7ch; 14 font: 20px monospace; 15 background: blue; 16 17 white-space: pre-wrap; 18 text-align: justify; 19 } 20 .test > span { 21 background: green;; 22 } 23 </style> 24 <p>Test passes if we have XX at each edge of the blue box and XXX in the second line (left-edge trailing space if not removed)</p> 25 <div class="test"><span>XX XX </span><span>XXX</span></div>