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/grid-placement/column-explicit-placement-003.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<html>
<link rel="match" href="column-explicit-placement-003-ref.html">
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<style>
.masonry {
    display: masonry;
    masonry-direction: column;
    background: gray;
    item-tolerance: 0;
    grid-template-columns: auto auto auto;
    height: 200px;
    width: 500px;
    gap: 20px;
    padding: 20px;
}
.first-track {
    background: lightskyblue;
    grid-column-start: 1;
    writing-mode: vertical-rl;
    height: max-content;
}
.second-track {
    background: lightcoral;
    grid-column-start: 2;
    width: fit-content;
    height: fit-content;
}
.third-track {
    background: lightgreen;
    grid-column-start: 3;
    writing-mode: vertical-lr;
    height: max-content;
}
</style>
<body>
  <p>Test that orthoganal masonry with explicit placement are correctly positioned within the grid axis and that the margins on the orthogonal items correctly affect track sizing.</p>
  <div class="masonry">
    <div class="first-track">This is some text</div>
    <div class="first-track" style="margin-right: 10px;">This is some text</div>
    <div class="first-track" style="writing-mode: horizontal-tb">This is some text</div>
    <div class="second-track" style="margin-bottom: 10px;">Some larger words in this sentence</div>
    <div class="third-track">The cat cannot be separated from milk</div>
    <div class="third-track">This is some other text</div>
  </div>
</body>
</html>