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:
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Lanes Test: row-direction subgridded item placement invalidation</title>
<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com">
<style>
html, body {
margin: 0;
padding: 0;
}
#grid-lanes {
height: 200px;
display: grid-lanes;
grid-lanes-direction: row;
background: lightgray;
grid-template-rows: [start] auto [end] 1fr;
}
#subgrid {
display: grid;
grid-row: 1 / -1;
grid-template-rows: subgrid;
}
#item {
height: 50px;
background: lightblue;
border: 5px solid gray;
grid-row: start / end;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<div id="grid-lanes">
<div id="subgrid">
<div id="item" data-offset-y="140"></div>
</div>
</div>
<script>
"use strict";
let grid_lanes = document.getElementById("grid-lanes");
let item = document.getElementById("item");
// Computing an offset forces layout.
let item_offset = item.offsetTop;
grid_lanes.style.gridTemplateRows = "1fr [start] auto [end]";
item_offset = item.offsetTop;
checkLayout("#item");
</script>