Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-gaps/grid-lanes/row-subgrid-rule-visibility-around-parent-between.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>
CSS Gap Decorations: row subgrid around visibility inside grid-lanes
with between visibility
</title>
<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
<link rel="match"
href="row-subgrid-rule-visibility-around-parent-between-ref.html">
<style>
body {
margin: 0;
}
.scene {
height: 330px;
position: relative;
width: 260px;
}
.lanes {
background: #dce6f0;
display: grid-lanes;
gap: 20px;
grid-template-rows: repeat(5, 50px);
height: 330px;
row-rule: 6px solid #243c9c;
row-rule-visibility-items: between;
width: 260px;
}
.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: 260px;
}
.subgrid {
background: #ffe0a3;
column-gap: 20px;
display: grid;
grid-row: 2 / span 3;
grid-template-columns: repeat(3, 40px);
grid-template-rows: subgrid;
row-rule: 6px solid #b83b00;
row-rule-visibility-items: around;
width: 160px;
}
.cell {
background: #087f75;
}
.first-cell {
grid-column: 1;
grid-row: 1;
}
.second-cell {
grid-column: 1;
grid-row: 2;
}
.third-cell {
grid-column: 2;
grid-row: 1;
}
</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 class="cell first-cell"></div>
<div class="cell second-cell"></div>
<div class="cell third-cell"></div>
</div>
<div class="after track-two"></div>
<div class="after track-three"></div>
<div class="after track-four"></div>
</div>
</div>