Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
.container {
display: grid;
grid-template-rows: repeat(3, 50px);
row-gap: 10px;
width: 200px;
border: solid blue;
}
.row {
display: flex;
flex-direction: row-reverse;
column-gap: 10px;
}
</style>
</head>
<body>
<p>Test that grid-lanes items with fill-reverse placement are correctly positioned
within a definite-size row container.</p>
<div class="container">
<!-- Row 1: items 1, 4, 7, 9 -->
<div class="row">
<div style="background: lavender; width: 20px;">1</div>
<div style="background: lightpink; width: 25px; height: 110px; margin-right: 10px;">4</div>
<div style="background: lightgreen; width: 20px;">7</div>
<div style="background: coral; width: 30px; margin-left: -10px;">9</div>
</div>
<!-- Row 2: items 2, 8, 11, 12 -->
<div class="row">
<div style="background: lightskyblue; width: 30px;">2</div>
<div style="background: lightpink; width: 40px; margin-right: 35px;">8</div>
<div style="background: tomato; width: 15px;">11</div>
<div style="background: orchid; width: 15px; margin-right: -125px; z-index: 1;">12</div>
</div>
<!-- Row 3: items 3, 5, 6, 10 -->
<div class="row">
<div style="background: lightgreen; width: 20px;">3</div>
<div style="background: lavender; width: 20px; margin-left: 10px;">5</div>
<div style="background: lightskyblue; width: 35px;">6</div>
<div style="background: gold; width: 30px; margin-right: -10px;">10</div>
</div>
</div>
</body>
</html>