wpt / css / css-grid / grid-lanes / item-placement / row-auto-placement-002.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/item-placement/row-auto-placement-002.html

<!DOCTYPE html>
<html>
<link rel="help" href="https://drafts.csswg.org/css-grid-3">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<link rel="match" href="row-auto-placement-002-ref.html">
<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com">
<style>
.grid-lanes {
    display: grid-lanes;
    background: gray;
    flow-tolerance: 0;
    grid-template-rows: auto auto auto;
    width: 870px;
    padding: 20px;
    gap: 20px;
    font: 15px/1 "Ahem";
}

.grid-lanes > div {
    width: max-content;
}

.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-row: 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/row-auto-placement-002-ref.html

<!DOCTYPE html>
<html>
<link rel="help" href="https://drafts.csswg.org/css-grid-3">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com">
<style>
.grid {
    display: grid;
    background: gray;
    grid-template-rows: auto auto auto;
    grid-template-columns: auto auto auto;
    width: 870px;
    gap: 20px;
    padding: 20px;
    align-items: start;
    font: 15px/1 "Ahem";
}

.grid > div {
    width: max-content;
}

.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;
    grid-row: 1 / 3;
    align-self: stretch;
    transform: translateX(-3em);
}
</style>
<body>
  <p>Test that grid-lanes items with auto placement are correctly positioned within the grid axis.</p>
  <div class="grid">
    <div class="grid-auto-item-1" style="grid-row: 1;">This is some text</div>
    <div class="grid-auto-item-2" style="grid-row: 2;">Some larger words in this sentence</div>
    <div class="grid-auto-item-3" style="grid-row: 3;">The cat cannot be separated from milk</div>
    <div class="grid-auto-item-4">The cat still cannot be separated from milk</div>
    <div class="grid-auto-item-4">The cat still cannot be separated from milk</div>
  </div>
</body>
</html>