wpt / css / css-flexbox / abspos / flex-abspos-align-self-safe-outer-cb-002.tentative.html

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

/css/css-flexbox/abspos/flex-abspos-align-self-safe-outer-cb-002.tentative.html

<!DOCTYPE html>
<html>
<head>
  <title>CSS Test: Testing safe overflow-position for align-self in absolutely positioned boxes in flex containers w/ item margin if the CB is not the flex container</title>
  <link rel="help" href="https://drafts.csswg.org/css-flexbox/#abspos-items">
  <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11934">
  <link rel="match" href="flex-abspos-align-self-safe-outer-cb-002-ref.html">
  <meta charset="utf-8">
  <style>
    .container {
      border: 3px solid blue;
      position: relative;
      width: 200px;
      margin: 50px;
    }
    .flex {
      display: flex;
      height: 50px;
      width: 50px;
      border: 3px solid black;
      vertical-align: top;
      margin-left: 125px;
    }
    .child {
      border: 2px dotted purple;
      background: teal;
      width: 225px;
      height: 75px;
      align-self: safe center;
      position: absolute;
      background: yellow;
      opacity: 0.5;
      margin: 5px;
    }
    .rowDir {
      flex-direction: row;
    }
    .colDir {
      flex-direction: column;
    }
    .vertRL {
      writing-mode: vertical-rl;
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="flex rowDir"><div class="child"></div></div>
  </div>
  <div class="container">
    <div class="flex colDir"><div class="child"></div></div>
  </div>
  <div class="container">
    <div class="flex rowDir vertRL"><div class="child"></div></div>
  </div>
  <div class="container">
    <div class="flex colDir vertRL"><div class="child"></div></div>
  </div>
</body>
</html>

/css/css-flexbox/abspos/flex-abspos-align-self-safe-outer-cb-002-ref.html

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <style>
    .container {
      border: 3px solid blue;
      position: relative;
      width: 200px;
      margin: 50px;
    }
    .flex {
      display: flex;
      height: 50px;
      width: 50px;
      border: 3px solid black;
      vertical-align: top;
      margin-left: 125px;
    }
    .child {
      border: 2px dotted purple;
      background: teal;
      width: 225px;
      height: 75px;
      align-self: center;
      position: absolute;
      background: yellow;
      opacity: 0.5;
      margin: 5px;
    }
    .rowDir {
      flex-direction: row;
    }
    .colDir {
      flex-direction: column;
    }
    .vertRL {
      writing-mode: vertical-rl;
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="flex rowDir"><div class="child" style="top:0;"></div></div>
  </div>
  <div class="container">
    <div class="flex colDir"><div class="child" style="left:106px;"></div></div>
  </div>
  <div class="container">
    <div class="flex rowDir vertRL"><div class="child"></div></div>
  </div>
  <div class="container">
    <div class="flex colDir vertRL"><div class="child" style="left:0;"></div></div>
  </div>
</body>
</html>