wpt / css / css-anchor-position / pseudo-element-implicit-anchor.html

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

/css/css-anchor-position/pseudo-element-implicit-anchor.html

<!DOCTYPE html>
<title>CSS Anchor Positioning: Originating element implicit anchor for pseudo elements</title>
<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#implicit">
<link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html">
<style>
  #anchor::after {
    content: "";
    position: absolute;
    position-anchor: auto;
    width: 100px;
    height: 100px;
    bottom: anchor(top);
    background: green;
  }
  #ref {
    width: 100px;
    height: 100px;
    background: red;
  }
</style>
<p>Test passes if there is a filled green square.</p>
<div id="ref"></div>
<div id="anchor"></div>

/css/reference/ref-filled-green-100px-square-only.html

<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
<p>Test passes if there is a filled green square.</p>
<div style="width:100px; height:100px; background:green;"></div>