Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /shadow-dom/focus-navigation/reading-flow/grid-lanes-row-reading-flow-010.tentative.html - WPT Dashboard Interop Dashboard
<!doctype html>
<meta charset="utf-8">
<meta name="timeout" content="long">
<title>CSS Grid Lanes: tentative across-track reading flow in row tracks in vertical-rl with RTL</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/shadow-dom/focus-navigation/resources/shadow-dom.js"></script>
<script src="/shadow-dom/focus-navigation/resources/focus-utils.js"></script>
<style>
.test-case {
margin-top: 20px;
}
.lanes {
display: grid-lanes;
writing-mode: vertical-rl;
direction: rtl;
fit-tolerance: 0;
gap: 0;
place-content: start;
align-items: start;
}
.rows {
grid-template-rows: repeat(2, 60px);
reading-flow: grid-lanes-flow;
width: 120px;
height: 260px;
}
.rows > div {
width: 100%;
}
</style>
<!--
At the moment we are counting an item as
part of a reading column if 2/3 of the item's stacking-axis length is within
the borders of the initial reading column bounds.
Reading regions depend on the preceding column: F fills most of its region,
so G is deferred to the third reading column.
First reading column: a, b, c, d
Second reading column: e, f
Third reading column: h, g, i
-->
<div class="test-case"
data-expect="a,b,c,d,e,f,h,g,i">
<div class="lanes rows">
<div id="d" tabindex="0" style="grid-row: 2; height: 100px; background-color: lightcoral">D</div>
<div id="a" tabindex="0" style="grid-row: 1; height: 20px; background-color: lightskyblue">A</div>
<div id="b" tabindex="0" style="grid-row: 1; height: 20px; background-color: lightgreen">B</div>
<div id="c" tabindex="0" style="grid-row: 1; height: 20px; background-color: khaki">C</div>
<div id="f" tabindex="0" style="grid-row: 2; height: 120px; background-color: plum">F</div>
<div id="e" tabindex="0" style="grid-row: 1; height: 180px; background-color: orange">E</div>
<div id="g" tabindex="0" style="grid-row: 2; height: 20px; background-color: paleturquoise">G</div>
<div id="i" tabindex="0" style="grid-row: 2; height: 20px; background-color: lightpink">I</div>
<div id="h" tabindex="0" style="grid-row: 1; height: 20px; background-color: silver">H</div>
</div>
</div>
<script>
runFocusTestCases();
</script>