tab-stop-threshold-001.html (1016B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Text level 3 Test: the nearest tab stop is more than 0.5 ch away</title> 4 <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> 5 <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> 6 <link rel="help" href="https://drafts.csswg.org/css-text-3/#tab-size-property"> 7 <link rel="match" href="reference/tab-stop-threshold-001-ref.html"> 8 <meta name="assert" content="A preserved tab pushes to the nearest tap stop as long as we're not closer to it than 0.5ch."> 9 <style> 10 div { 11 white-space: pre; 12 font-family: monospace; 13 tab-size: 8; /* the initial value, but since we're measuring against it, we might as well be sure */ 14 } 15 span { display: inline-block; } 16 #s1 { width: 6ch; } 17 #s2 { width: 7ch; } 18 #s3 { width: 7.3ch; } 19 </style> 20 21 <p>Test passes if the 4 letters bellow are vertically aligned. 22 <div><span id=s1></span>	P</div> 23 <div><span id=s2></span>	A</div> 24 <div><span id=s3></span>	S</div> 25 <div> S</div>