wpt / css / css-flexbox / flex-abspos-inset-nested-001.html

Status: PASS | Duration: 9ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-flexbox/flex-abspos-inset-nested-001.html

<!DOCTYPE html>
<title>Nested abspos flex with intermediate percentage-height containing block</title>
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#definite-sizes">
<link rel="match" href="flex-abspos-inset-nested-001-ref.html">
<style>
.outer-flex {
  display: flex;
  height: 200px;
}

.flex-item {
  width: 100%;
}

.intermediate {
  position: relative;
  height: 100%;
}

.inner-flex {
  display: flex;
  position: absolute;
  top: 0;
  bottom: 0;
}

img {
  display: block;
}
</style>
<p>Test passes if there is a 200x200 green square.</p>
<div class="outer-flex">
  <div class="flex-item">
    <div class="intermediate">
      <div class="inner-flex">
        <img src="../support/1x1-green.png">
      </div>
    </div>
  </div>
</div>

/css/css-flexbox/flex-abspos-inset-nested-001-ref.html

<!DOCTYPE html>
<title>Reference</title>
<style>
.ref {
  width: 200px;
  height: 200px;
  background: green;
}
</style>
<p>Test passes if there is a 200x200 green square.</p>
<div class="ref"></div>