white-space-pre-wrap-trailing-spaces-012.html (1483B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>CSS Text test: hanging trailing spaces with white-space:pre-wrap</title> 4 <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com"> 5 <link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> 6 <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap"> 7 <link rel="help" title="4.1.3. Phase II: Trimming and Positioning" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> 8 <link rel="help" title="5.2. Breaking Rules for Letters: the word-break property" href="https://drafts.csswg.org/css-text-3/#word-break-property"> 9 <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-normal"> 10 <link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-012-ref.html"> 11 <link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-alt-012-ref.html"> 12 <meta name="assert" content="Previous breaking opportunities are not considered if the overflow is caused by hanging trailing spaces."> 13 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> 14 <style> 15 div { 16 font: 20px/1 Ahem; 17 width: 4ch; 18 white-space: pre-wrap; 19 } 20 span { background: blue; } /* If the space is removed instead of hanging, there will be no blue box*/ 21 </style> 22 23 <p>This test passes if the line is broken after the 2nd white space, which hangs (blue). 24 <div>XX X<span> X</span></div>