Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-text/tab-size/tab-size-block-ancestor.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: tab-size based on block ancestor's space</title>
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
<link rel="match" href="tab-size-block-ancestor-ref.html">
<meta name="assert" content="tab width is based on space character in the block ancestor">
<style>
div {
font: 16px monospace;
white-space: pre;
tab-size: 10;
}
.test1 span {
font-size: 1px;
}
.test2 span {
font-size: 10px;
}
.test3 span {
tab-size: 5;
}
.test4 span {
font-size: 10px;
tab-size: 2.5;
}
b {
font: bold 16px monospace;
}
</style>
<p>Test passes if the five “A” letters below are vertically aligned with each other.
<div>
<b>A</b><!-- indented by 10 spaces -->
</div>
<div class=test1>
<span>	<b>A</b></span>
</div>
<div class=test2>
<span>	<b>A</b></span>
</div>
<div class=test3>
<span>		<b>A</b></span>
</div>
<div class=test4>
<span>				<b>A</b></span>
</div>