Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-grid/grid-lanes/tentative/gap/row-gaps-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<link rel="match" href="row-gaps-001-ref.html">
<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com">
<style>
.grid-lanes {
display: grid-lanes;
masonry-direction: row;
background: gray;
item-tolerance: 0;
grid-template-rows: repeat(3, 100px);
height: 400px;
width: 380px;
padding: 20px;
gap: 50px 10px;
}
.grid-lanes > div {
width: 100px;
}
.auto-item {
padding: 10px;
}
.auto-item:nth-of-type(1) {
background: lightskyblue;
}
.auto-item:nth-of-type(2) {
background: lightcoral;
}
.auto-item:nth-of-type(3) {
background: lightgreen;
}
.two-track-spanner {
background: lightpink;
grid-row: span 2;
padding: 10px;
}
</style>
<body>
<p>Test that gaps are correctly used within masonry containers.</p>
<div class="grid-lanes">
<div class="auto-item">This is some text</div>
<div class="auto-item">Some larger words in this sentence</div>
<div class="auto-item">The cat cannot be separated from milk</div>
<div class="two-track-spanner">The cat still cannot be separated from milk</div>
<div class="two-track-spanner">The cat still cannot be separated from milk</div>
</div>
</body>
</html>