wpt / css / css-grid / grid-lanes / alignment / row-justify-items-004.html

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

/css/css-grid/grid-lanes/alignment/row-justify-items-004.html

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>CSS Grid Lanes Test: items with explicit size don't stretch, and multi-span items don't stretch if a later item occupies one of their tracks in row direction</title>
  <link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
  <link rel="help" href="https://drafts.csswg.org/css-grid-3/#alignment">
  <link rel="match" href="row-justify-items-004-ref.html">
  <style>
    html, body {
      color: black; background-color: white; font: 16px/1 monospace; padding: 0; margin: 0;
    }

    .grid-lanes {
      display: grid-lanes;
      grid-lanes-direction: row;
      grid-template-rows: repeat(3, 80px);
      width: 500px;
      gap: 10px;
      padding: 2px;
      margin: 5px;
      justify-items: stretch;
    }

    item {
      display: block;
      color: white;
    }
  </style>
</head>
<body>

<div class="grid-lanes">
  <item style="width: 40px; background: #f4a0a0;">1</item>
  <item style="width: 80px; background: #aad4f5;">2</item>
  <item style="width: 200px; background: #2ca02c;">3</item>
  <item style="background: #f4a0a0; grid-row: span 2;">4</item>
  <item style="background: #2ca02c; grid-row: span 3;">5</item>
  <item style="background: #ff7f0e; grid-row: 2;">6</item>
</div>

</body>
</html>

/css/css-grid/grid-lanes/alignment/row-justify-items-004-ref.html

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <style>
    html, body {
      color: black; background-color: white; font: 16px/1 monospace; padding: 0; margin: 0;
    }

    .grid {
      display: grid;
      grid-template-rows: repeat(3, 80px);
      grid-template-columns: 80px 110px auto 1fr;
      width: 500px;
      gap: 10px;
      padding: 2px;
      margin: 5px;
      justify-items: start;
    }

    .track {
      display: flex;
      flex-direction: row;
      gap: 10px;
    }

    item {
      display: block;
      color: white;
    }
  </style>
</head>
<body>

<div class="grid">
  <item style="grid-row: 1; grid-column: 1; width: 40px; background: #f4a0a0;">1</item>
  <div class="track" style="grid-row: 2; grid-column: 1;">
    <item style="width: 80px; background: #aad4f5;">2</item>
  </div>
  <item style="width: 200px; background: #2ca02c; grid-row: 3; grid-column: 1 / span 2;">3</item>
  <item style="background: #f4a0a0; grid-row: 1 / span 2; grid-column: 2; justify-self: stretch;">4</item>
  <item style="background: #2ca02c; grid-row: 1 / span 3; grid-column: 3;">5</item>
  <item style="background: #ff7f0e; grid-row: 2; grid-column: 4; justify-self: stretch;">6</item>
</div>

</body>
</html>