wpt / css / css-grid / grid-lanes / item-placement / dense-packing / column-dense-packing-004.html

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

/css/css-grid/grid-lanes/item-placement/dense-packing/column-dense-packing-004.html

<!DOCTYPE html>
<html>
<link rel="help" href="https://drafts.csswg.org/css-grid-3">
<link rel="match" href="column-dense-packing-004-ref.html">
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<style>
.grid-lanes {
    display: grid-lanes;
    background: gray;
    flow-tolerance: 0;
    grid-template-columns: 30px 40px 50px 30px;
    padding: 10px;
    grid-auto-flow: dense;
    grid-lanes-pack: dense;
}
</style>
<body>
  <p>Ensure dense-packing only places items into gaps where the track size is the same as where the item would have been laid out WITHOUT dense packing.</p>
  <div class="grid-lanes">
    <div style="background: lightskyblue; height: 40px; grid-column: 1" >
      1
    </div>
    <div style="background: lightgreen; height: 40px; grid-column: 3">
      2
    </div>
    <div style="background: brown; height: 10px; grid-column: span 4;">
      3
    </div>
    <div style="background: red; height: 40px; width: 30px;">
      4
    </div>
  </div>
</body>
</html>

/css/css-grid/grid-lanes/item-placement/dense-packing/column-dense-packing-004-ref.html

<!DOCTYPE html>
<html>
<link rel="help" href="https://drafts.csswg.org/css-grid-3">
<style>
.grid {
    display: grid;
    background: gray;
    position: relative;
    grid-template-columns: 30px 40px 50px 30px;
    padding: 10px;
    grid-auto-flow: dense;
}
</style>
<body>
  <p>Ensure dense-packing only places items into gaps where the track size is the same as where the item would have been laid out WITHOUT dense packing.</p>
  <div class="grid">
    <div style="background: lightskyblue; height: 40px; grid-column: 1" >
     1
    </div>
    <div style="background: lightgreen; height: 40px; grid-column: 3">
      2
    </div>
    <div style="background: brown; height: 10px; grid-column: span 4;">
      3
    </div>
    <div style="background: red; height: 40px; width: 30px; grid-column: 4;">
      4
    </div>
  </div>
</body>
</html>