white-space-pre-wrap-trailing-spaces-003.html (863B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>CSS Text test: intrinsic minimum sizing of 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-003-ref.html"> 7 <meta name="assert" content="Preserved white space at the end of soft-wrapped lines is hanged when white-space is pre-wrap, and therefore does not count when computing the (minimum) intrinsic size."> 8 9 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 10 <style> 11 div { 12 font: 25px/1 Ahem; 13 white-space: pre-wrap; 14 width: min-content; 15 color: green; 16 background: red; 17 } 18 </style> 19 20 <p>This test passes if there is a green rectangle and no red. 21 22 <div>X X X X</div>