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/alignment/row-overflow-alignment-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<link rel="match" href="row-overflow-alignment-001-ref.html">
<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com">
<style>
.masonry {
display: masonry;
masonry-direction: row;
background: gray;
item-tolerance: 0;
grid-template-rows: 70px;
align-items: unsafe center;
width: 300px;
height: 70px;
}
.overflow-safe {
align-self: safe end;
width: 75px;
height: 75px;
background-color: lightgreen;
}
.overflow-unsafe {
align-self: unsafe end;
width: 75px;
height: 75px;
background-color: lightblue;
}
.small-item {
width: 50px;
background-color: lightyellow;
}
</style>
<body>
<p>Test that overflow safe and unsafe are working as expected.
<div class="masonry">
<div class="overflow-safe">
Overflow safe
</div>
<div style="width: 50px; background-color: lightpink; height: fit-content;">
Regular item
</div>
<div class="overflow-unsafe">
Overflow unsafe
</div>
<div style="height: 150px; width: 100px; background-color: brown">
Overflow center
</div>
</div>
</body>
</html>