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-column-reading-flow-020.tentative.html - WPT Dashboard Interop Dashboard
<!doctype html>
<meta charset="utf-8">
<meta name="timeout" content="long">
<title>CSS Grid Lanes: reading-flow across column tracks where row gaps affect the reading row</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;
}
.columns {
display: grid-lanes;
fit-tolerance: 0;
gap: 40px;
place-content: start;
justify-items: start;
grid-template-columns: repeat(3, 60px);
reading-flow: grid-lanes-flow;
width: 260px;
height: 160px;
}
.columns > div {
width: 100%;
}
</style>
<!--
Using the tentative 2/3-overlap rule, a seeds [0,100]. The 40px row
gaps put d at [60,100] (fully inside) and e at [60,160] (40% inside).
Ignoring row gaps, or extending the row through a's following gutter,
would give e 80% overlap and incorrectly put it before f.
Reading rows: [a, b, d, c], [f, e].
-->
<div class="test-case"
data-expect="a,b,d,c,f,e">
<div class="columns">
<div id="a" tabindex="0" style="grid-column: 1; height: 100px; background-color: lightcoral">A</div>
<div id="b" tabindex="0" style="grid-column: 2; height: 20px; background-color: lightskyblue">B</div>
<div id="c" tabindex="0" style="grid-column: 3; height: 20px; background-color: lightgreen">C</div>
<div id="d" tabindex="0" style="grid-column: 2; height: 40px; background-color: khaki">D</div>
<div id="e" tabindex="0" style="grid-column: 3; height: 100px; background-color: plum">E</div>
<div id="f" tabindex="0" style="grid-column: 1; height: 20px; background-color: orange">F</div>
</div>
</div>
<script>
runFocusTestCases();
</script>