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/">
<link rel="help" href="https://drafts.csswg.org/css-grid-3/">
<style>
body { margin: 0; }
.lanes {
display: grid-lanes;
grid-template-columns: repeat(2, 60px);
gap: 10px;
background: #cdd5e0;
width: max-content;
}
.lanes > div {
background: #5b8def;
color: #fff;
font: 600 12px/1 sans-serif;
}
.lanes > div.a { grid-column: 1; height: 30px; }
.lanes > div.c { grid-column: 2; height: 50px; }
.lanes > div.b { grid-column: 1; height: 30px; }
.lanes > div.d { grid-column: 1; height: 30px; }
.lanes > div.s {
grid-column: 1 / span 2;
height: 30px;
background: #8a6df0;
}
.row-rule { position: absolute; height: 0; }
</style>
<div class="lanes">
<div class="a">1</div>
<div class="c">2</div>
<div class="b">3</div>
<div class="d">4</div>
<div class="s">5 (span 2)</div>
</div>
<div class="row-rule" style="top: 33px; left: 0; width: 60px; border-top: 4px solid red;"></div>
<div class="row-rule" style="top: 73px; left: 0; width: 60px; border-top: 4px solid blue;"></div>
<div class="row-rule" style="top: 113px; left: 0; width: 60px; border-top: 4px solid red;"></div>
<div class="row-rule" style="top: 113px; left: 70px; width: 60px; border-top: 4px solid red;"></div>