Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
<link rel="help" href="https://drafts.csswg.org/css-gaps-1/">
<style>
body {
margin: 0;
}
.scene {
height: 130px;
position: relative;
width: 140px;
}
.lanes {
background: lightgray;
column-gap: 20px;
display: grid-lanes;
grid-template-columns: repeat(2, 60px);
height: 130px;
width: 140px;
}
.subgrid {
display: grid;
grid-column: 1 / span 2;
grid-template-columns: subgrid;
grid-template-rows: repeat(3, 30px);
row-gap: 20px;
}
.cell {
background: teal;
}
.top-left {
grid-column: 1;
grid-row: 1;
}
.top-right {
grid-column: 2;
grid-row: 1;
}
.spanning-item {
background: rgb(255 165 0 / 50%);
grid-column: 1 / span 2;
grid-row: 2;
}
.bottom-left {
grid-column: 1;
grid-row: 3;
}
.bottom-right {
grid-column: 2;
grid-row: 3;
}
.column-rule {
background: blue;
height: 30px;
left: 67px;
position: absolute;
width: 6px;
}
.top-rule {
top: 0;
}
.bottom-rule {
top: 100px;
}
</style>
<div class="scene">
<div class="lanes">
<div class="subgrid">
<div class="cell top-left"></div>
<div class="cell top-right"></div>
<div class="spanning-item"></div>
<div class="cell bottom-left"></div>
<div class="cell bottom-right"></div>
</div>
</div>
<div class="column-rule top-rule"></div>
<div class="column-rule bottom-rule"></div>
</div>