Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<html>
<link rel="help" href="https://drafts.csswg.org/css-grid-3">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
.grid {
display: grid;
grid-template-rows: minmax(15px, min-content) max-content auto;
grid-template-columns: 3em 2em 1em;
background-color: gray;
height: 100px;
width: 100px;
font: 10px/1 Ahem;
}
</style>
<body>
<p>Test that masonry tracks are correctly sized, and auto tracks are stretched.</p>
<div class="grid">
<div style="grid-row: 1; background: green; width: min-content;">XXX XXX</div>
<div style="grid-row: 1 / 3; background: purple; width: 2em;">X XX X</div>
<div style="grid-row: 1; height: 100%; width: 1em; background: yellow;"></div>
<div style="grid-row: 2; grid-column: 3; height: 100%; width: 1em; background: orange;"></div>
<div style="grid-row: 3; height: 100%; width: 1em; background: blue;"></div>
</div>
</body>
</html>