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="row-dense-packing-multi-span-004-ref.html">
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<style>
.masonry {
display: masonry;
item-tolerance: 0;
masonry-direction: row;
grid-template-rows: repeat(4, 50px);
grid-auto-flow: dense;
}
</style>
<body>
<p>Ensure that dense-packing in masonry only places items with specified tracks into track openings in those same specified tracks.</p>
<div class="masonry">
<div style="background: brown; width: 20px; grid-row: span 2;"></div>
<div style="background: darkgoldenrod; width: 20px; grid-row: span 4;"></div>
<div style="background: tan; width: 40px; grid-row: 3 / span 2;"></div>
<div style="background: brown; width: 20px; grid-row: span 4;"></div>
<div style="background: yellow; width: 20px; grid-row: 1 / span 2;"></div>
<div style="background: pink; width: 20px; grid-row: span 2;"></div>
</div>
</body>
</html>