Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

  • This WPT test may be referenced by the following Test IDs:
<!DOCTYPE HTML>
<html><head>
<meta charset="utf-8">
<title>CSS Grid Lanes Test: auto-placed spanning column-axis grid-lanes subgrid in a grid-lanes container</title>
<link rel="author" title="Yanling Wang" href="mailto:yanlingwang@microsoft.com">
<link rel="match" href="grid-lanes-subgrid-002a-ref.html">
<style>
html,body {
color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0;
}
grid-lanes {
display: inline grid-lanes;
grid-template-columns: 40px 30px 20px;
gap: 4px;
padding: 1px 3px 5px 7px;
border: solid;
border-width: 3px 5px 1px 1px;
background: lightgrey content-box;
}
item {
background: grey;
width: 3ch;
position: relative;
}
item:nth-child(2n) { background:purple; width:auto; }
item:nth-child(1) {
border: solid;
border-width: 3px 5px 1px 1px;
margin: 7px 1px 5px 3px;
}
subgrid {
display: grid-lanes;
grid-template-columns: subgrid;
grid-column: auto/span 2;
gap: 4px;
background: yellow;
}
</style>
</head>
<body>
<grid-lanes>
<item style="height: 24px">1</item>
<item style="height: 40px">2</item>
<item style="height: 40px">3</item>
<subgrid style="height: calc(30px + 4px + 20px)">
<item style="height: 13px">4a</item>
<item style="height: 29px">4b</item>
<item style="height: 19px">4c</item>
</subgrid>
<item style="height: 30px">5</item>
</grid-lanes>
</body>
</html>