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/subgrid/placement-implicit-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<html><head>
<meta charset="utf-8">
<title>CSS Grid Test: Implicit line placement with a subgrid</title>
<link rel="author" title="Kurt Catti-Schmidt" href="mailto:kschmi@microsoft.com">
<link rel="match" href="placement-implicit-001-ref.html">
<style>
html,body {
font:10px/1 monospace;
padding:0;
margin:0;
}
.grid {
display: inline-grid;
grid-auto-columns: 15px;
border: 1px solid;
}
.subgrid {
display: grid;
grid-template-columns: subgrid;
grid-column: 3 / span 4;
grid-auto-rows: 8px;
background: grey;
}
.subgrid > :nth-child(2n) { background: black; }
.subgrid > :nth-child(2n+1) { background: pink; }
</style>
</head>
<body>
<div class="grid">
<div class="subgrid">
<div style="grid-column:5"></div>
<div style="grid-column:x"></div>
<div style="grid-column:5"></div>
<div></div>
<div style="grid-column:5"></div>
</div>
</div>
<div class="grid">
<div class="subgrid">
<div style="grid-column:5"></div>
<div style="grid-column:5"></div>
<div style="grid-column:x"></div>
<div style="grid-column:5"></div>
<div style="grid-column:x"></div>
<div style="grid-column:5"></div>
</div>
</div>
<div class="grid">
<div class="subgrid">
<div style="grid-column:5"></div>
<div></div>
<div style="grid-column:5"></div>
<div></div>
<div style="grid-column:5"></div>
<div></div>
</div>
</div>
</body>
</html>