Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<html>
<style>
.grid {
display: grid;
grid-template-columns: repeat(3, 50px);
grid-auto-flow: dense;
}
</style>
<body>
<p>When dense-packing, ensure that open tracks are split correctly.</p>
<div class="grid">
<div style="background: lightskyblue; height: 30px; grid-column: 1;" >
1
</div>
<div style="grid-column: 1 / span 2;">
<div style="background: blue; height: 15px; grid-column: 1 / span 2;">
2
</div>
<div style="background: lightskyblue; height: 30px; grid-column: 1 / span 1;" >
3
</div>
</div>
<div style="grid-column: span 2;">
<div style="background: yellow; height: 15px;">
5
</div>
<div style="background: yellow; height: 15px;">
6
</div>
</div>
<div style="background: lightskyblue; height: 90px; grid-column: 3;" >
7
</div>
<div style="grid-column: 1; transform: translateY(-45px);">
<div style="background: blue; height: 15px; width: 100px;">
4
</div>
<div style="background: yellow; height: 15px; width: 50px; grid-column: span 2;">
9
</div>
<div style="background: yellow; height: 10px;">
11
</div>
</div>
<div style="background: blue; height: 10px; grid-column: 2 / span 2; transform: translateY(-40px);">
8
</div>
<div style="background: yellow; height: 30px; width: 100px; grid-column: 2; transform: translateY(-125px);">
10
</div>
<div style="background: yellow; height: 15px; grid-column: 2; grid-row: 3; transform: translateY(-15px);">
12
</div>
</div>
</body>
</html>