Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<link rel="help" href="https://drafts.csswg.org/css-grid-3">
<link rel="match" href="column-overflow-alignment-001-ref.html">
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<style>
.masonry {
display: masonry;
background: gray;
position: relative;
item-tolerance: 0;
grid-template-columns: 50px;
justify-items: unsafe center;
width: 50px;
}
.overflow-safe {
justify-self: safe end;
width: 75px;
height: 50px;
background-color: lightgreen;
}
.overflow-unsafe {
justify-self: unsafe end;
width: 75px;
height: 50px;
background-color: lightblue;
}
.small-item {
width: 25px;
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;">
Regular item
</div>
<div class="overflow-unsafe">
Overflow unsafe
</div>
<div class="small-item">
Small item
</div>
<div style="width: 150px; background-color: brown">
Overflow center
</div>
</div>
</body>
</html>