Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<title>CSS Masonry Test: Alignment for items and self in grid axis</title>
<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com">
<link rel="match" href="row-align-items-end-align-self-start-001-ref.html">
<style>
.masonry {
display: masonry;
masonry-direction: row;
background: gray;
item-tolerance: 0;
grid-template-rows: repeat(3, 100px);
width: 300px;
align-items: end;
}
.fifty-width {
width: 50px;
background-color: lightblue;
}
</style>
<body>
<p>Test that using align-items moves each masonry item to the end of the grid-axis track it is on</p>
<p>and that align-self overrides align-items.</p>
<div class="masonry">
<div style="width: 50px; height: 50px; background-color: lightblue;"></div>
<div style="width: 100px; height: 15px; background-color: lightsalmon; align-self: start;"></div>
<div style="width: 25px; height: 25px; background-color: plum;"></div>
<div style="background-color: lightgreen; width: 60px; height: 60px;"></div>
<div style="background-color: lightpink; height: 80px; width: 200px; grid-row: span 2;"></div>
</div>
</body>
</html>