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/item-placement/row-fill-reverse-definite-size-002.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Grid Lanes: Row fill-reverse where items overflow the definite size</title>
<link rel="match" href="row-fill-reverse-definite-size-002-ref.html">
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<style>
.grid-lanes {
display: grid-lanes;
flow-tolerance: 0;
grid-template-rows: repeat(3, 50px);
gap: 10px;
width: 120px;
border: solid blue;
grid-lanes-direction: row fill-reverse;
}
</style>
</head>
<body>
<p>Test that grid-lanes items with fill-reverse placement are correctly positioned
when overflowing a definite-size row container.</p>
<div class="grid-lanes">
<div style="background: lavender; width: 20px;">1</div>
<div style="background: lightskyblue; width: 30px;">2</div>
<div style="background: lightgreen; width: 20px;">3</div>
<div style="background: lightpink; grid-row: span 2; width: 25px;">4</div>
<div style="background: lavender; width: 20px; margin-left: 10px;">5</div>
<div style="background: lightskyblue; width: 35px;">6</div>
<div style="background: lightgreen; width: 20px;">7</div>
<div style="background: lightpink; width: 40px;">8</div>
<!-- Negative margin-left, less than item size -->
<div style="background: coral; width: 30px; margin-left: -10px;">9</div>
<!-- Negative margin-right, less than item size -->
<div style="background: gold; width: 30px; margin-right: -10px;">10</div>
<!-- Negative margin-left, greater than item size -->
<div style="background: tomato; width: 15px; margin-left: -25px;">11</div>
<!-- The furthest right the item can go is 40px to the left of where item 9 starts -->
<div style="background: orchid; width: 15px; margin-right: -100px;">12</div>
</div>
</body>
</html>