Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 4 subtest issues.
 - This WPT test may be referenced by the following Test IDs:
            
- /css/css-grid/masonry/tentative/track-sizing/auto-repeat/column-auto-repeat-012.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<title>Auto repeat tracks with min and max sizes</title>
<meta name="assert" content="This test checks that auto repeat tracks don't overflow the masonry container size when max size is definite, even if min size is bigger than that.">
<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com">
<style>
.masonry {
    position: relative;
    display: masonry;
    grid-template-columns: repeat(auto-fill, 100px);
    max-width: 100px;
    min-width: 250px;
    max-height: 50px;
    min-height: 125px;
    float: left;
    background: pink;
}
.item {
  background: lime;
  /* Place item on the last column. */
  grid-column: -2;
  width: 100%;
  height: 125px;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.masonry');">
<div id="log"></div>
<div class="masonry" data-expected-width="250" data-expected-height="125">
  <div class="item" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="125"></div>
</div>
<div class="masonry" style="width: 200px; height: 100px;" data-expected-width="250" data-expected-height="125">
  <div class="item" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="125"></div>
</div>
<div class="masonry" style="width: min-content; height: min-content;" data-expected-width="250" data-expected-height="125">
  <div class="item" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="125"></div>
</div>
<div class="masonry" style="width: max-content; height: max-content;" data-expected-width="250" data-expected-height="125">
  <div class="item" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="125"></div>
</div>
</body>