wpt / css / css-grid / grid-lanes / item-placement / column-auto-placement-001.html

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

/css/css-grid/grid-lanes/item-placement/column-auto-placement-001.html

<!DOCTYPE html>
<html>
<link rel="help" href="https://drafts.csswg.org/css-grid-3">
<link rel="match" href="column-auto-placement-001-ref.html">
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<style>
.grid-lanes {
    display: grid-lanes;
    background: gray;
    position: relative;
    flow-tolerance: 0;
    grid-template-columns: auto auto auto;
    width: 340px;
    padding: 20px;
    gap: 20px;
}

.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;
}

.two-track-spanner {
    background: lightpink;
    grid-column: span 2;
    padding: 10px;
}
</style>
<body>
  <p>Test that grid-lanes items with auto placement are correctly positioned within the grid axis.</p>
  <div class="grid-lanes">
    <div class="auto-item">This is some text</div>
    <div class="auto-item">Some larger words in this sentence</div>
    <div class="auto-item">The cat cannot be separated from milk</div>
    <div class="two-track-spanner">The cat still cannot be separated from milk</div>
    <div class="two-track-spanner">The cat still cannot be separated from milk</div>
  </div>
</body>
</html>

/css/css-grid/grid-lanes/item-placement/column-auto-placement-001-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>
.grid {
    display: grid;
    background: gray;
    grid-template-columns: 100px 100px 100px;
    width: 340px;
    gap: 20px;
    padding: 20px;
    align-items: start;
}

.flex {
    display: flex;
    flex-direction: column;
    overflow: visible;
    flex-wrap: nowrap;
    gap: 20px;
}

.grid-auto-item-1 {
    background: lightskyblue;
    padding: 10px;
}

.grid-auto-item-2 {
    background: lightcoral;
    padding: 10px;
}

.grid-auto-item-3 {
    background: lightgreen;
    padding: 10px;
}

.grid-auto-item-4 {
    background: lightpink;
    padding: 10px;
    width: 200%;
    transform: translateX(-120px);
}
</style>
<body>
  <p>Test that grid-lanes items with auto placement are correctly positioned within the grid axis.</p>
  <div class="grid">
    <div class="flex">
      <div class="grid-auto-item-1" style="grid-column: 1">This is some text</div>
    </div>
    <div class="flex">
      <div class="grid-auto-item-2" style="grid-column: 2">Some larger words in this sentence</div>
      <div class="grid-auto-item-4" style="grid-column: 2">The cat still cannot be separated from milk</div>
      <div class="grid-auto-item-4" style="grid-column: 2">The cat still cannot be separated from milk</div>
    </div>
    <div class="flex">
      <div class="grid-auto-item-3" style="grid-column: 3">The cat cannot be separated from milk</div>
    </div>
  </div>
</body>
</html>