Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

  • This WPT test may be referenced by the following Test IDs:
    • /css/css-grid/grid-lanes/subgrid/grid-subgridded-to-grid-lanes/track-sizing/column-auto-placed-subgrid-inherited-tracks-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>CSS Grid Lanes Test: Auto-placed subgrid measures its inherited tracks against its resolved position</title>
<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com">
<link rel="match" href="column-auto-placed-subgrid-inherited-tracks-001-ref.html">
<style>
.wrapper {
width: 150px;
height: 100px;
background: red;
position: relative;
}
.lanes {
display: grid-lanes;
grid-template-columns: 50px 100px;
flow-tolerance: 0;
position: absolute;
top: 0;
left: 0;
}
.child {
grid-column: 1;
width: 50px;
height: 100px;
background: green;
}
.subgrid {
display: grid;
writing-mode: vertical-rl;
grid: subgrid / auto;
grid-column: auto / span 1;
overflow: hidden;
}
.subgrid-child {
aspect-ratio: 1;
height: 100%;
background: green;
}
</style>
</head>
<body>
<p>Test passes if there is a filled green rectangle and <strong>no red</strong>.</p>
<div class="wrapper">
<div class="lanes">
<div class="child"></div>
<div class="subgrid"><div class="subgrid-child"></div></div>
</div>
</div>
</body>
</html>