Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>CSS Gap Decorations: an auto-placed row subgrid paints rules using its final grid-lanes tracks and position</title>
<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
<link rel="help" href="https://drafts.csswg.org/css-gaps-1/">
<link rel="match" href="row-subgrid-auto-placement-decorations-ref.html">
<style>
body {
margin: 0;
}
.scene {
height: 310px;
width: 122px;
}
.lanes {
background: lightgray;
column-gap: 20px;
display: grid-lanes;
flow-tolerance: 0px;
grid-template-rows: 40px 70px 50px 90px;
height: 310px;
row-gap: 20px;
width: 122px;
}
.blocker {
background: purple;
}
.blocker-one {
grid-row: 1;
width: 120px;
}
.blocker-two {
grid-row: 2;
width: 100px;
}
.blocker-three {
grid-row: 3;
width: 30px;
}
.blocker-four {
grid-row: 4;
width: 30px;
}
.subgrid {
column-gap: 12px;
column-rule: 4px solid blue;
display: grid;
grid-row: span 2;
grid-template-columns: repeat(2, 30px);
grid-template-rows: subgrid;
row-rule: 6px solid gold;
}
.cell {
background: teal;
}
</style>
<div class="scene">
<div class="lanes">
<div class="blocker blocker-one"></div>
<div class="blocker blocker-two"></div>
<div class="blocker blocker-three"></div>
<div class="blocker blocker-four"></div>
<div class="subgrid">
<div class="cell"></div>
<div class="cell"></div>
<div class="cell"></div>
<div class="cell"></div>
</div>
</div>
</div>