white-space-intrinsic-size-005.html (1087B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Text Test: min-content sizing and white-space: pre-wrap</title> 4 <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-text-3/#propdef-white-space"> 6 <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> 7 <link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-004-ref.html"> 8 <link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-alt-004-ref.html"> 9 <meta name="assert" content="Preserved spaces at the end of the line unconditioanlly hang, hence they do not affect the intrinsic min-content size."> 10 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> 11 <style> 12 div { 13 font: 25px/1 Ahem; 14 color: green; 15 background: red; 16 17 width: min-content; 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 there is a green square and no red. 24 25 <div>XX<span> </span>XX</div>