wpt / css / css-gaps / grid / subgrid / fragmentation / subgrid-gap-decorations-fragmentation-020.html

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

/css/css-gaps/grid/subgrid/fragmentation/subgrid-gap-decorations-fragmentation-020.html

<!DOCTYPE html>
<title>
  Gap Decorations are shown in a grid that's fragmented. The subgrid has a
  larger row-gap than the parent grid. The row gap that crosses the
  fragmentainer boundary is not suppressed due to the subgrid spanning item.
</title>
<link rel="help" href="https://drafts.csswg.org/css-gaps-1/">
<link rel="match" href="subgrid-gap-decorations-fragmentation-020-ref.html">
<link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com">
<style>
  body {
    margin: 0px;
  }
  .multicol {
    position: relative;
    columns: 2;
    column-fill: auto;
    width: 280px;
    height: 80px;
    background: yellow;
    column-gap: 0px;
  }
  .grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    background: lightgray;
    gap: 10px;
    height: 140px;
    column-rule: skyblue solid 10px;
    row-rule: cornflowerblue solid 10px;
    column-rule-break: none;
    row-rule-break: none;
  }
  .subgrid {
    display: grid;
    grid-template-columns: subgrid;
    grid-template-rows: subgrid;
    background: orange;
    grid-column: 2 / -2;
    grid-row: 2 / -2;
    row-gap: 20px;
    column-rule: white solid 10px;
    row-rule: blue solid 10px;
  }
  .item {
    background: purple;
  }
</style>
<div class="multicol">
  <div class="grid-container">
    <div class="subgrid">
      <div class="item"></div>
      <div class="item"></div>
      <div class="item"></div>
      <div class="item"></div>
      <div class="item"></div>
      <div class="item"></div>
      <div class="item"></div>
      <div class="item"></div>
      <div class="item"></div>
    </div>
  </div>
</div>

/css/css-gaps/grid/subgrid/fragmentation/subgrid-gap-decorations-fragmentation-020-ref.html

<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-gaps-1/">
<link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com">
<style>
  body {
    margin: 0px;
  }
  .multicol {
    position: relative;
    columns: 2;
    column-fill: auto;
    width: 280px;
    height: 80px;
    background: yellow;
    column-gap: 0px;
  }
  .grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: 20px 10px 15px 5px 10px 5px 10px 5px 15px 15px 10px 20px;
    background: lightgray;
    column-gap: 10px;
  }
  .subgrid-bg {
    background: orange;
    grid-column: 2 / -2;
    grid-row: 3 / 10;
  }
  .item {
    background: purple;
  }
  .col-gap-group {
    position: absolute;
    top: 0px;
    left: 20px;
    display: flex;
    gap: 20px;
    height: 80px;
  }
  .col-gap {
    width: 10px;
    background: skyblue;
  }
  .row-gap {
    position: absolute;
    background: cornflowerblue;
    height: 10px;
    left: 0px;
    width: 140px;
  }
</style>
<div class="multicol">
  <div class="grid-container">
    <div class="subgrid-bg"></div>

    <!-- Subgrid row 1 items (ref row 3 = 15px) -->
    <div class="item" style="grid-row:3; grid-column:2;"></div>
    <div class="item" style="grid-row:3; grid-column:3;"></div>
    <div class="item" style="grid-row:3; grid-column:4;"></div>

    <!-- Subgrid row 2 items (ref row 7 = 10px) -->
    <div class="item" style="grid-row:7; grid-column:2;"></div>
    <div class="item" style="grid-row:7; grid-column:3;"></div>
    <div class="item" style="grid-row:7; grid-column:4;"></div>

    <!-- Subgrid row 3 items (ref row 9 = 15px) -->
    <div class="item" style="grid-row:9; grid-column:2;"></div>
    <div class="item" style="grid-row:9; grid-column:3;"></div>
    <div class="item" style="grid-row:9; grid-column:4;"></div>
  </div>

  <!-- F1 outer col-gaps (full height) -->
  <div class="col-gap-group">
    <div class="col-gap"></div>
    <div class="col-gap"></div>
    <div class="col-gap"></div>
    <div class="col-gap"></div>
  </div>

  <!-- F1 subgrid col-gaps (y=30-80, 50px) -->
  <div class="col-gap-group" style="height: 50px; top: 30px; left: 50px;">
    <div class="col-gap" style="background: white;"></div>
    <div class="col-gap" style="background: white;"></div>
  </div>

  <!-- F2 outer col-gaps (60px) -->
  <div class="col-gap-group" style="left: 160px; height: 60px;">
    <div class="col-gap"></div>
    <div class="col-gap"></div>
    <div class="col-gap"></div>
    <div class="col-gap"></div>
  </div>

  <!-- F2 subgrid col-gaps (y=0-15, 15px) -->
  <div class="col-gap-group" style="height: 15px; top: 0px; left: 190px;">
    <div class="col-gap" style="background: white;"></div>
    <div class="col-gap" style="background: white;"></div>
  </div>

  <!-- F1 gap 1-2 (y=20, full width) -->
  <div class="row-gap" style="top: 20px;"></div>

  <!-- F1 gap 2-3 (y=50, full width cornflowerblue) -->
  <div class="row-gap" style="top: 50px;"></div>

  <!-- F1 subgrid row-gap (blue, y=50, 10px — on top of cornflowerblue) -->
  <div class="row-gap" style="top: 50px; left: 30px; width: 80px; background: blue;"></div>

  <!-- F2 gap 4-5 (y=30, full width) -->
  <div class="row-gap" style="top: 30px; left: 140px;"></div>
</div>