tab-size-spacing-002.html (1076B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Text level 3 Test: tab-size and letter-spacing</title> 4 <link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-text-3/#tab-size-property"> 6 <link rel="help" href="https://drafts.csswg.org/css-text-3/#letter-spacing-property"> 7 <link rel="match" href="tab-size-spacing-002-ref.html"> 8 <meta name="assert" content="For the tab-size property, a <number> represents the measure as a multiple of the space character’s advance width (U+0020) including its associated letter-spacing and word-spacing"> 9 <style> 10 div { 11 font-family: monospace; /* so we can compare tab with a count of preserved spaces */ 12 white-space: pre; 13 } 14 .test { 15 letter-spacing: 1ch; /* effectively double the advance of the characters */ 16 tab-size: 3; 17 } 18 .ref1 { 19 letter-spacing: 1ch; 20 } 21 .ref2 { 22 white-space: pre; 23 } 24 </style> 25 26 <p>Test passes if the "1"s all line up vertically: 27 <div class=ref1>1231231231</div> 28 <div class=test>1	1	1	1</div> 29 <div class=ref2>1 1 1 1</div>