servo/tests/wpt/css-tests/css-writing-modes-3_dev/html/table-progression-vrl-001.htm

133 lines
No EOL
3.5 KiB
HTML

<!DOCTYPE html>
<html><head><meta charset="utf-8">
<title>CSS Test: vertical-rl Table Row/Rowgroup/Cell Ordering</title>
<link href="http://fantasai.inkedblade.net/contact" rel="author" title="Elika J. Etemad">
<link href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" rel="reviewer" title="Gérard Talbot"> <!-- 2016-01-15 -->
<link href="reference/table-progression-001-ref.htm" rel="match">
<meta content="This test checks that vertical-rl tables order rows/rowgroups right to left and cells top-to-bottom (LTR) or bottom-to-top (RTL) per 'direction'. This test also checks that 'writing-mode' and 'direction' do not apply to table rows and row groups." name="assert">
<link href="http://www.w3.org/TR/css-writing-modes-3/#block-flow" rel="help" title="3.1 Block Flow Direction: the 'writing-mode' property">
<link href="http://www.w3.org/TR/css-writing-modes-3/#direction" rel="help" title="2.1 Specifying Directionality: the 'direction' property">
<style>
.test {
writing-mode: vertical-rl;
}
[dir=rtl] {
direction: rtl;
}
table {
border-spacing: 0;
margin: 1em;
}
td {
width: 1em;
height: 1em;
border: solid gray;
}
.navy { background: navy}
.blue { background: blue }
.aqua { background: aqua }
.teal { background: teal }
.purp { background: purple }
.pink { background: fuchsia }
.yllw { background: yellow }
.orng { background: orange }
/* These rules must have no effect. */
.test thead,
.test tfoot,
.test tbody,
.test tr,
.test td {
writing-mode: horizontal-tb; /* For UAs not supporting vertical-rl */
writing-mode: vertical-lr;
direction: rtl;
}
.test[dir=rtl] thead,
.test[dir=rtl] tfoot,
.test[dir=rtl] tbody,
.test[dir=rtl] tr,
.test[dir=rtl] td {
direction: ltr;
}
</style>
</head><body><p>Test passes if the following three tables look identical.
</p><table class="test">
<thead>
<tr>
<td class="navy">
</td><td class="blue">
</td><td colspan="2">
</td></tr></thead><tfoot>
<tr>
<td colspan="2">
</td><td class="aqua">
</td><td class="teal">
</td></tr></tfoot><tbody>
<tr>
<td rowspan="3">
</td><td colspan="2">
</td><td class="purp">
</td></tr><tr>
<td class="pink">
</td><td colspan="2" rowspan="2">
</td></tr><tr>
<td class="yllw">
</td></tr></tbody><tbody>
<tr>
<td class="orng">
</td><td colspan="3">
</td></tr></tbody></table>
<table class="test" dir="rtl">
<thead>
<tr>
<td colspan="2">
</td><td class="blue">
</td><td class="navy">
</td></tr></thead><tfoot>
<tr>
<td class="teal">
</td><td class="aqua">
</td><td colspan="2">
</td></tr></tfoot><tbody>
<tr>
<td class="purp">
</td><td colspan="2">
</td><td rowspan="3">
</td></tr><tr>
<td colspan="2" rowspan="2">
</td><td class="pink">
</td></tr><tr>
<td class="yllw">
</td></tr></tbody><tbody>
<tr>
<td colspan="3">
</td><td class="orng">
</td></tr></tbody></table>
<table class="reference">
<tbody><tr>
<td rowspan="2">
</td><td class="orng">
</td><td colspan="3">
</td><td class="navy">
</td></tr><tr>
<td rowspan="3">
</td><td class="yllw">
</td><td class="pink">
</td><td rowspan="2">
</td><td class="blue">
</td></tr><tr>
<td class="aqua">
</td><td colspan="2" rowspan="2">
</td><td rowspan="2">
</td></tr><tr>
<td class="teal">
</td><td class="purp">
</td></tr></tbody></table>
</body></html>