Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

  • This WPT test may be referenced by the following Test IDs:
<!DOCTYPE html>
<html>
<link rel="help" href="https://drafts.csswg.org/css-grid-3">
<link rel="match" href="column-dense-packing-multi-span-001-ref.html">
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<style>
.masonry {
display: masonry;
item-tolerance: 0;
grid-template-columns: repeat(4, 50px);
grid-auto-flow: dense;
}
</style>
<body>
<p>Ensure that dense-packing places multi-spanning item into highest eligible track opening. The yellow item should be placed in track opening.</p>
<div class="masonry">
<div style="background: lightskyblue; height: 70px;" >
1
</div>
<div style="background: lightblue; height: 20px; grid-column: 4;" >
2
</div>
<div style="background: darkblue; height: 20px; grid-column: 3 / span 2;">
3
</div>
<div style="background: lightsteelblue; height: 20px; grid-column: span 4;" >
4
</div>
<div style="background: yellow; height: 10px; grid-column: span 2;" >
5
</div>
</div>
</body>
</html>