wpt / css / css-grid / grid-lanes / item-placement / row-auto-placement-max-content.html

Status: FAIL | Duration: 15ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-grid/grid-lanes/item-placement/row-auto-placement-max-content.html

<!DOCTYPE html>
<html>
<link rel="help" href="https://drafts.csswg.org/css-grid-3">
<link rel="match" href="row-auto-placement-max-content-ref.html">
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<style>
html,body {
  color:black; background-color:white; font:15px/1 monospace; padding:0; margin:0;
}

.grid-lanes {
    display: grid-lanes;
    background: gray;
    position: relative;
    flow-tolerance: 0;
    grid-template-rows: auto auto auto;
    width: max-content;
    padding: 10px;
}
</style>
<body>
  <p>Ensure that grid-lanes containers are sized correctly under max-content constraints even if the items do not have the max-content style.</p>
  <div class="grid-lanes">
    <div style="background: lightskyblue;">
      Number 1
    </div>
    <div class="second-track" style="background: lightcoral;">
      Number 2
    </div>
    <div class="third-track" style="background: lightgreen;">
      Number 3
    </div>
    <div style="grid-row: span 2; background: brown;">
      Number 4
    </div>
  </div>
</body>
</html>

/css/css-grid/grid-lanes/item-placement/row-auto-placement-max-content-ref.html

<!DOCTYPE html>
<html>
<link rel="help" href="https://drafts.csswg.org/css-grid-3">
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<style>
html,body {
  color:black; background-color:white; font:15px/1 monospace; padding:0; margin:0;
}

.grid {
    display: grid;
    grid-template-rows: 15px auto auto;
    align-items: start;
    background: gray;
    padding: 10px;
    width: max-content;
}

.flex {
    display: flex;
    flex-direction: row;
    overflow: visible;
    flex-wrap: nowrap;
    width: max-content;
}
</style>
<body>
  <p>Ensure that grid-lanes containers are sized correctly under max-content constraints even if the items do not have the max-content style.</p>
  <div class="grid">
    <div class="flex">
      <div style="background: lightskyblue;">
        Number 1
    </div>
    <div style="background: brown; height: 30px;">
      Number 4
    </div>
    </div>
    <div class="flex">
      <div style="background: lightcoral;">
        Number 2
    </div>
    </div>
    <div class="flex">
      <div style="background: lightgreen;">
        Number 3
    </div>
    </div>
  </div>
</body>
</html>