white-space-processing-052.xht (1557B)
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 'pre-wrap' on a 'pre' element</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#white-space-model" /> 7 <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-1" /> 8 <link rel="match" href="white-space-processing-052-ref.xht" /> 9 <meta name="flags" content="ahem" /> 10 <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 when set on a 'pre' element." /> 11 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 12 <style type="text/css"> 13 pre 14 { 15 font: 16px/1em Ahem; 16 margin: 0; 17 padding: 0; 18 } 19 #pre1 20 { 21 white-space: pre-wrap; 22 width: 5em; 23 } 24 #pre2 25 { 26 background: black; 27 display: inline-block; 28 height: 1em; 29 width: 2em; 30 } 31 </style> 32 </head> 33 <body> 34 <p>Test passes if there is one box below.</p> 35 <pre id="pre1">XX XX</pre> 36 <pre id="pre2"></pre> 37 </body> 38 </html>