wpt / css / css-grid / grid-lanes / alignment / row-grid-lanes-alignment-positioned-items-002.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-grid-lanes-alignment-positioned-items-002.html

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>CSS Grid Lanes Test: Safe and unsafe alignment values for positioned items</title>
  <link rel="author" title="Yanling Wang" href="mailto:yanlingwang@microsoft.com">
  <link rel="help" href="https://drafts.csswg.org/css-grid-3/#abspos">
  <link rel="help" href="https://drafts.csswg.org/css-grid-3/#alignment">
  <link rel="match" href="row-grid-lanes-alignment-positioned-items-002-ref.html">
  <style>
    html,body {
      color:black; background-color:white; font:8px/1 monospace; padding:0; margin:0;
    }

    .grid-lanes {
      position: relative;
      display: grid-lanes;
      grid-template-rows: 80px 80px 80px;
      width: 150px;
      height: 290px;
      gap: 10px;
      padding: 10px;
      border: 2px solid black;
      margin: 10px;
    }

    .grid-lanes > div {
      position: absolute;
      border: 1px solid #333;
      width: 30px;
      height: 120px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .safe-start {
      grid-row: 1 / 2;
      justify-self: safe start;
      background: lightcoral;
    }

    .unsafe-start {
      grid-row: 2 / 3;
      justify-self: unsafe start;
      background: lightblue;
    }

    .safe-end {
      grid-row: 3 / 4;
      justify-self: safe end;
      background: lightgreen;
    }

    .unsafe-end {
      grid-row: 1 / 2;
      justify-self: unsafe end;
      background: lightyellow;
    }

    .safe-center {
      grid-row: 2 / 3;
      justify-self: safe center;
      background: plum;
    }

    .unsafe-center {
      grid-row: 3 / 4;
      justify-self: unsafe center;
      background: orange;
    }
  </style>
</head>
<body>
  <div class="grid-lanes">
    <div class="safe-start">safe-start</div>
    <div class="unsafe-start">unsafe-start</div>
    <div class="safe-end">safe-end</div>
    <div class="unsafe-end">unsafe-end</div>
    <div class="safe-center">safe-center</div>
    <div class="unsafe-center">unsafe-center</div>
  </div>

  <div class="grid-lanes" style="direction: rtl;">
    <div class="safe-start">safe-start</div>
    <div class="unsafe-start">unsafe-start</div>
    <div class="safe-end">safe-end</div>
    <div class="unsafe-end">unsafe-end</div>
    <div class="safe-center">safe-center</div>
    <div class="unsafe-center">unsafe-center</div>
  </div>
</body>
</html>

/css/css-grid/grid-lanes/alignment/row-grid-lanes-alignment-positioned-items-002-ref.html

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

    .grid {
      position: relative;
      display: grid;
      grid-template-columns: 150px;
      grid-template-rows: 80px 80px 80px;
      width: 150px;
      height: 290px;
      gap: 10px;
      padding: 10px;
      border: 2px solid black;
      margin: 10px;
    }

    .grid > div {
      position: absolute;
      border: 1px solid #333;
      width: 30px;
      height: 120px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .safe-start {
      grid-row: 1 / 2;
      justify-self: safe start;
      background: lightcoral;
    }

    .unsafe-start {
      grid-row: 2 / 3;
      justify-self: unsafe start;
      background: lightblue;
    }

    .safe-end {
      grid-row: 3 / 4;
      justify-self: safe end;
      background: lightgreen;
    }

    .unsafe-end {
      grid-row: 1 / 2;
      justify-self: unsafe end;
      background: lightyellow;
    }

    .safe-center {
      grid-row: 2 / 3;
      justify-self: safe center;
      background: plum;
    }

    .unsafe-center {
      grid-row: 3 / 4;
      justify-self: unsafe center;
      background: orange;
    }
  </style>
</head>
<body>
  <div class="grid">
    <div class="safe-start">safe-start</div>
    <div class="unsafe-start">unsafe-start</div>
    <div class="safe-end">safe-end</div>
    <div class="unsafe-end">unsafe-end</div>
    <div class="safe-center">safe-center</div>
    <div class="unsafe-center">unsafe-center</div>
  </div>

  <div class="grid" style="direction: rtl;">
    <div class="safe-start">safe-start</div>
    <div class="unsafe-start">unsafe-start</div>
    <div class="safe-end">safe-end</div>
    <div class="unsafe-end">unsafe-end</div>
    <div class="safe-center">safe-center</div>
    <div class="unsafe-center">unsafe-center</div>
  </div>
</body>
</html>