Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
<style>
body {
margin: 0;
}
.scene {
height: 330px;
position: relative;
width: 220px;
}
.lanes {
background: #dce6f0;
display: grid-lanes;
gap: 20px;
grid-template-rows: repeat(5, 50px);
height: 330px;
width: 220px;
}
.before,
.after,
.side {
background: #52677d;
}
.before,
.after {
width: 30px;
}
.track-two {
grid-row: 2;
}
.track-three {
grid-row: 3;
}
.track-four {
grid-row: 4;
}
.side {
grid-row: 1;
width: 220px;
}
.subgrid {
background: #ffe0a3;
column-gap: 20px;
display: grid;
grid-row: 2 / span 3;
grid-template-columns: repeat(2, 50px);
grid-template-rows: subgrid;
width: 120px;
}
.rule {
position: absolute;
}
.row-rule {
height: 6px;
}
.parent-rule {
background: #243c9c;
}
.parent-outside {
left: 0;
width: 220px;
}
.parent-first {
top: 57px;
}
.parent-fourth {
top: 267px;
}
.parent-before {
left: 0;
width: 30px;
}
.parent-after {
left: 190px;
width: 30px;
}
.second {
top: 127px;
}
.third {
top: 197px;
}
.child-column {
background: #b83b00;
height: 190px;
left: 107px;
top: 70px;
width: 6px;
}
.child-row {
background: #9c1755;
left: 50px;
width: 120px;
}
</style>
<div class="scene">
<div class="lanes">
<div class="before track-two"></div>
<div class="before track-three"></div>
<div class="before track-four"></div>
<div class="side"></div>
<div class="subgrid"></div>
<div class="after track-two"></div>
<div class="after track-three"></div>
<div class="after track-four"></div>
</div>
<div class="rule row-rule parent-rule parent-first parent-outside"></div>
<div class="rule row-rule parent-rule parent-fourth parent-outside"></div>
<div class="rule row-rule parent-rule second parent-before"></div>
<div class="rule row-rule parent-rule second parent-after"></div>
<div class="rule row-rule parent-rule third parent-before"></div>
<div class="rule row-rule parent-rule third parent-after"></div>
<div class="rule child-column"></div>
<div class="rule row-rule child-row second"></div>
<div class="rule row-rule child-row third"></div>
</div>