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/grid-gap-decorations-collapsed-middle-auto-fit.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>
CSS Gap Decorations: Row rules paint correctly when an interior
`repeat(auto-fit, ...)` row range collapses between explicit tracks.
</title>
<link rel="match" href="grid-gap-decorations-collapsed-middle-auto-fit-ref.html">
<link rel="author" title="Kurt Catti-Schmidt" href="mailto:kschmi@microsoft.com">
<style>
body {
margin: 0;
}
.grid {
display: grid;
grid-template-columns: 100px 100px 100px;
grid-template-rows: 100px repeat(auto-fit, 100px) 100px 100px;
gap: 10px;
width: 320px;
height: 540px;
align-content: start;
row-rule: 6px solid red;
row-rule-visibility-items: around;
rule-inset: 0px;
}
.item {
width: 100%;
height: 100%;
background: lightgray;
opacity: 0.8;
}
</style>
<div class="grid">
<div class="item" style="grid-column: 1 / 4; grid-row: -3 / -2"></div>
<div class="item" style="grid-column: 1 / 4; grid-row: -2 / -1"></div>
</div>