Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body { margin: 0; }
.root {
border: 2px solid black;
display: grid-lanes;
grid-template-rows: 100px 200px 300px;
width: max-content;
}
.subgrid {
display: grid;
grid-template-rows: subgrid;
}
.outer {
border: 2px solid purple;
grid-row: 1 / -1;
width: 260px;
}
.middle {
border: 2px solid orange;
grid-row: 2;
margin-block-start: 52px;
}
.inner {
border: 2px solid cyan;
grid-row: 1 / -1;
}
.leaf {
background: green;
grid-row: 1;
height: 100%;
width: 84px;
}
.leaf:nth-child(2) { background: royalblue; }
.leaf:nth-child(3) { background: gold; }
</style>
<div class="root">
<div class="subgrid outer" id="margin-outer">
<div class="subgrid middle" id="margin-middle">
<div class="subgrid inner" id="margin-inner">
<div class="leaf"></div>
<div class="leaf"></div>
<div class="leaf"></div>
</div>
</div>
</div>
</div>