Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>CSS Gap Decorations: around row rule segments with negative stacking margins and centered densely packed items</title>
<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
<link rel="match" href="row-gap-decorations-rule-visibility-items-around-007-ref.html">
<style>
body { margin: 0; }
.cases { display: flex; gap: 20px; }
.lanes {
background: #cdd5e0;
row-rule: 4px solid blue;
row-rule-break: intersection;
row-rule-visibility-items: around;
display: grid-lanes;
flow-tolerance: 0;
gap: 20px;
grid-lanes-direction: row;
grid-template-rows: repeat(2, 60px);
width: max-content;
}
.lanes > div {
background: #5b8def;
grid-row: 1;
width: 40px;
}
.lanes > .tall { grid-row: 2; width: 100px; }
.lanes > .overlap { background: #1f9d6b; margin-left: -30px; }
.lanes > .spanner { background: #8a6df0; grid-row: 1 / -1; }
.dense { grid-lanes-pack: dense; }
.lanes > .centered {
justify-self: center;
background: #1f9d6b;
width: 20px;
}
</style>
<div class="cases">
<div class="lanes">
<div></div>
<div class="tall"></div>
<div class="overlap"></div>
<div class="spanner"></div>
<div></div>
</div>
<div class="lanes dense">
<div></div>
<div class="tall"></div>
<div class="spanner"></div>
<div class="centered"></div>
<div></div>
</div>
</div>