white-space-pre-031.html (1454B)
1 <!DOCTYPE html> 2 3 <meta charset="UTF-8"> 4 5 <title>CSS Text: wrappable ('normal') inline inside a 'white-space: pre' block</title> 6 7 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> 8 <link rel="help" href="https://www.w3.org/TR/css-text-3/#white-space-property"> 9 <link rel="match" href="reference/white-space-pre-031-ref.html"> 10 11 <style> 12 div 13 { 14 border: black solid 2px; 15 font-family: monospace; 16 font-size: 32px; 17 margin-bottom: 0.25em; 18 width: 16ch; 19 } 20 21 div#test 22 { 23 white-space: pre; 24 } 25 26 span 27 { 28 white-space: normal; 29 } 30 31 div#reference 32 { 33 white-space: normal; 34 } 35 </style> 36 37 <p>Test passes if the characters inside of each black-bordered rectangles are laid out identically. 38 39 <div id="test">Lorem ips<span>um. Dolo</span>r 40 sit	amet.</div> 41 42 <div id="reference">Lorem ipsum. <br> 43 Dolor<br> 44 sit amet.</div> 45 46 <!-- 47 48 <div id="test">Lorem ipsum. Dolor 49 ^ 50 1 51 52 sit	amet.</div> 53 ^^^ 54 123 55 56 Since 'tab-size' is by default 8, 57 since "sit" uses 3 characters 58 and since there are 3 preserved 59 white space characters before "sit", 60 61 8 62 - 63 3 64 - 65 3 66 ===== 67 2 68 69 then the horizontal tabulation will use as much space 70 as a sequence of 2 preserved white space characters. 71 72 73 	 == Horizontal tabulation == 	 == 	 74 75 -->