letter-spacing-trim-start-001.html (974B)
1 <!doctype html> 2 <html> 3 <head> 4 <meta charset=utf-8> 5 <title>CSS test: letter-spacing should be trimmed at start of line</title> 6 <link rel=author href="mailto:jkew@mozilla.com"> 7 <link rel=match href="reference/letter-spacing-trim-start-001-ref.html"> 8 <link rel=help href="https://drafts.csswg.org/css-text-3/#letter-spacing-property"> 9 <link rel=help href="https://bugzilla.mozilla.org/show_bug.cgi?id=1892262"> 10 <style> 11 .outer { 12 position: relative; 13 font: 24px/2 monospace; 14 } 15 .box { 16 display: inline-block; 17 width: 2ch; 18 height: 1.75em; 19 margin: calc(1ch - 2px); 20 border: 2px solid black; 21 border-radius: 5px; 22 } 23 .test { 24 position: absolute; 25 top: .5em; 26 left: 1.5ch; 27 letter-spacing: 3ch; 28 } 29 </style> 30 </head> 31 <body> 32 The numbers should be centered in the boxes:<br> 33 <div class=outer> 34 <div class=box></div><div class=box></div><div class=box></div><div class=box></div><div class=box></div><div class=box></div> 35 <div class=test>123456</div> 36 </div> 37 </body> 38 </html>