white-space-pre-035.html (1476B)
1 <!DOCTYPE html> 2 3 <meta charset="UTF-8"> 4 5 <title>CSS Text: wrappable ('pre-line') 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: pre-line; 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 123456 51 52 sit	amet.</div> 53 ^^^ 54 123 55 56 57 Since 'tab-size' is by default 8, 58 since "sit" uses 3 characters 59 and since there are 3 preserved 60 white space characters before "sit", 61 62 8 63 - 64 3 65 - 66 3 67 ===== 68 2 69 70 then the horizontal tabulation will be converted 71 into a sequence of 2 preserved white space characters. 72 73 74 	 == Horizontal tabulation == 	 == 	 75 76 -->