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-track-sizing-002.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>CSS Grid Lanes Test: Subgrid auto track sizing (column-direction grid-lanes)</title>
<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com">
<link rel="match" href="../../../../../reference/ref-filled-green-100px-square.xht">
<style>
.wrapper {
width: 100px;
height: 100px;
background: red;
}
.grid-lanes {
display: inline-grid-lanes;
grid-template-columns: repeat(10, auto);
}
.subgrid {
display: grid;
grid-template-columns: subgrid;
grid-column: 1 / -1;
}
.item {
background: green;
height: 50px;
width: 50px;
}
</style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div class="wrapper">
<div class="grid-lanes">
<div class="subgrid">
<div class="item" style="grid-column: span 3;"></div>
<div class="item" style="grid-column: span 7;"></div>
<div class="item" style="grid-column: span 6;"></div>
<div class="item" style="grid-column: span 4;"></div>
</div>
</div>
</div>
</body>
</html>