wpt / css / css-grid / grid-lanes / gap / column-gaps-001.html

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

/css/css-grid/grid-lanes/gap/column-gaps-001.html

<!DOCTYPE html>
<html>
<link rel="help" href="https://drafts.csswg.org/css-grid-3">
<link rel="match" href="column-gaps-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: repeat(3, 100px);
    width: 400px;
    padding: 20px;
    gap: 10px 50px;
}

.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 gaps are correctly used within grid-lanes containers.</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/gap/column-gaps-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: repeat(3, 100px);
    width: 400px;
    gap: 50px;
    padding: 20px;
    align-items: start;
}

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

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

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

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

.grid-auto-item-4 {
    background: lightpink;
    padding: 10px;
    width: calc(200% + 30px);
    transform: translateX(-150px);
}
</style>
<body>
  <p>Test that gaps are correctly used within grid-lanes containers.</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>