Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>CSS Gap Decorations: stacking-axis alignment of single- and multi-span densely packed items keeps row rules at opening boundaries in column grid-lanes</title>
<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
<link rel="match" href="column-gap-decorations-041-ref.html">
<style>
body { margin: 0; }
.lanes {
display: grid-lanes;
grid-template-columns: repeat(4, 80px);
grid-lanes-pack: dense;
flow-tolerance: 0;
column-gap: 20px;
row-gap: 20px;
background: #cdd5e0;
width: max-content;
row-rule: 4px solid gold;
}
.lanes > div {
background: #5b8def;
}
.lanes > div.a { grid-column: 1; height: 40px; }
.lanes > div.b { grid-column: 2; height: 40px; }
.lanes > div.c { grid-column: 3; height: 60px; }
.lanes > div.d { grid-column: 4; height: 120px; }
.lanes > div.spanner {
grid-column: 1 / span 4;
height: 40px;
background: #8a6df0;
}
.lanes > div.packed {
background: #1f9d6b;
}
.lanes > div.centered {
grid-column: 1 / span 2;
height: 20px;
align-self: center;
}
.lanes > div.stretched {
grid-column: 3;
align-self: stretch;
}
</style>
<div class="lanes">
<div class="a"></div>
<div class="b"></div>
<div class="c"></div>
<div class="d"></div>
<div class="spanner"></div>
<div class="packed centered"></div>
<div class="packed stretched"></div>
</div>