pre-wrap-017.html (919B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Text level 3 Test: pre-wrap trailing spaces and max-content</title> 4 <link rel="author" title="Florian Rivoal" href="http://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/pre-wrap-001-ref.html"> 7 <meta name="assert" content="When white-space is pre-wrap, trailing spaces spaces are taken into account for max-content"> 8 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 9 <style> 10 #red { 11 position: absolute; 12 z-index:-1; 13 width: 40px; 14 height: 40px; 15 background: red; 16 } 17 #test { 18 margin-left: -1em; 19 font: 40px/1 Ahem; 20 color: white; 21 background: green; 22 width: max-content; 23 white-space: pre-wrap 24 } 25 </style> 26 27 <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> 28 29 <div id=red></div> 30 <div id=test>X </div>