Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: tab-size and letter-spacing</title>
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
<link rel="match" href="tab-size-spacing-002-ref.html">
<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">
<style>
div {
font-family: monospace; /* so we can compare tab with a count of preserved spaces */
white-space: pre;
}
.test {
letter-spacing: 1ch; /* effectively double the advance of the characters */
tab-size: 3;
}
.ref1 {
letter-spacing: 1ch;
}
.ref2 {
white-space: pre;
}
</style>
<p>Test passes if the "1"s all line up vertically:
<div class=ref1>1231231231</div>
<div class=test>1&#9;1&#9;1&#9;1</div>
<div class=ref2>1 1 1 1</div>