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/item-placement/item-tolerance/column-initial-item-tolerance.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>CSS Masonry Test: Initial value of item-tolerance</title>
<link rel="author" title="Ethan Jimenez" href="mailto:ethavar@microsoft.com">
<link rel="match" href="column-initial-item-tolerance-ref.html">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
.masonry {
    display: masonry;
    background: gray;
    font: 50px/1 Ahem;
    grid-template-columns: repeat(2, 1fr);
    item-tolerance: initial;
    gap: 20px;
    padding: 20px;
    width: 400px;
}
.auto-item {
    padding: 10px;
}
.auto-item:nth-of-type(1) {
    background: lightskyblue;
}
.auto-item:nth-of-type(2) {
    background: lightcoral;
}
.auto-item:nth-of-type(3) {
    background: lightgreen;
}
.auto-item:nth-of-type(4) {
    background: palegoldenrod;
}
</style>
<body>
  <p>Test that the initial tie threshold for masonry is correctly resolved.</p>
  <div class="masonry">
    <div class="auto-item" style="height: 80px"></div>
    <div class="auto-item" style="height: 30px"></div>
    <div class="auto-item" style="height: 30px"></div>
    <div class="auto-item" style="height: 80px"></div>
  </div>
</body>
</html>