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-between.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Gap Decorations: a row subgrid paints between only cells occupied on both sides</title>
<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
<link rel="match" href="row-subgrid-rule-visibility-between-ref.html">
<style>
body {
margin: 0;
}
.scene {
height: 190px;
width: 120px;
}
.lanes {
background: lightgray;
display: grid-lanes;
grid-template-rows: repeat(3, 50px);
height: 190px;
row-gap: 20px;
width: 120px;
}
.subgrid {
column-gap: 20px;
display: grid;
grid-row: 1 / span 3;
grid-template-columns: repeat(2, 50px);
grid-template-rows: subgrid;
row-rule: 6px solid gold;
row-rule-visibility-items: between;
}
.cell {
background: teal;
}
.top-left {
grid-column: 1;
grid-row: 1;
}
.top-right {
grid-column: 2;
grid-row: 1;
}
.middle-left {
grid-column: 1;
grid-row: 2;
}
</style>
<div class="scene">
<div class="lanes">
<div class="subgrid">
<div class="cell top-left"></div>
<div class="cell top-right"></div>
<div class="cell middle-left"></div>
</div>
</div>
</div>