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/masonry/tentative/item-placement/row-negative-margin-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<link rel="match" href="row-negative-margin-001-ref.html">
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<style>
.masonry {
display: masonry;
item-tolerance: 0;
masonry-direction: row;
}
</style>
<body>
<p>When an item with negative margins are placed, ensure the items after it are placed immediately behind it</p>
<div class="masonry">
<div style="background: aquamarine; width: 50px;" >
item 1
</div>
<div style="background: aquamarine; width: 50px;" >
item 1
</div>
<div style="background: aquamarine; width: 50px;" >
item 1
</div>
<div style="background: lightblue; width: 50px; margin-left: -100px;" >
item 2
</div>
<div style="background: lightpink; width: 50px;">
item 3
</div>
</div>
</body>
</html>