Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<html>
<style>
html, body {
font: 15px/1 monospace;
margin: 0;
}
.grid {
display: grid;
grid-template-rows: repeat(4, 100px);
gap: 20px;
}
</style>
<body>
<p>Ensure that row dense-packing honors flow-tolerance. The second pink item (Item 4a) should stack after Item 1 in the first row, not in the last row.</p>
<div class="grid">
<div style="background: lightblue; width: 90px; grid-row: 1; grid-column: 1;">Item 1</div>
<div style="background: lightgreen; width: 180px; grid-row: 2; grid-column: 1;">Item 2</div>
<div style="background: lightgray; width: 80px; grid-row: 3; grid-column: 1;">Item 3</div>
<div style="background: pink; width: 70px; grid-row: 4; grid-column: 1;">Item 4</div>
<div style="background: pink; width: 70px; grid-row: 1; grid-column: 1; transform: translateX(110px);">Item 4a</div>
<div style="background: yellow; width: 15px; grid-row: 3; grid-column: 1; transform: translateX(100px);">Item 5</div>
</div>
</body>
</html>