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:
<!DOCTYPE html>
<title>Auto repeat tracks with min and max sizes</title>
<link rel="help" href="https://drafts.csswg.org/css-grid-3">
<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, auto);
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: 100px;
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="75" 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="75" 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="75" 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="75" data-offset-y="0" data-expected-width="100" data-expected-height="125"></div>
</div>
</body>