white-space-004.xht (1726B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: White-space set to 'pre-wrap'</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#propdef-white-space" /> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#white-space-prop" /> 8 <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-1" /> 9 <link rel="match" href="white-space-004-ref.xht" /> 10 <meta name="flags" content="ahem" /> 11 <meta name="assert" content="The 'white-space' property set to 'pre-wrap' does not remove extra spacing when two spaces are next to each other and introduces line breaking opportunities." /> 12 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 13 <style type="text/css"> 14 div 15 { 16 font: 20px/1em Ahem; 17 margin: 0; 18 padding: 0; 19 } 20 #test 21 { 22 white-space: pre-wrap; 23 width: 5em; 24 } 25 #reference 26 { 27 background: blue; 28 display: inline-block; 29 height: 1em; 30 width: 2em; 31 } 32 </style> 33 </head> 34 <body> 35 <p>Test passes if there is a single black box above a blue box (there can be white space between the boxes) and the black box has the same width as the blue box.</p> 36 <div id="test">XX XX</div> 37 <div id="reference"></div> 38 </body> 39 </html>