Status: FAIL | Duration: 11ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-anchor-position/position-area-pseudo-element-implicit-anchor-dynamic.html
<!DOCTYPE html> <title>Implicit anchor element for pseudo-elements using anchor functions - dynamic change</title> <link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#implicit"> <link rel="match" href="position-area-pseudo-element-implicit-anchor-ref.html"> <style> body { margin: 0 } #target { margin-top: 200px; margin-left: 200px; width: 100px; height: 100px; background: blue; } #target::before, #target::after { width: 100px; height: 100px; position: absolute; position-anchor: auto; } #target.moved { margin-top: 100px; margin-left: 50px; } #target::before { position-area: center right; background: green; content:''; } #target::after { position-area: bottom center; background: green; content:''; } </style> <div id=target></div> <script> target.offsetTop; target.classList.add("moved"); </script>
/css/css-anchor-position/position-area-pseudo-element-implicit-anchor-ref.html
<!DOCTYPE html> <title>CSS Test Reference</title> <style> body { margin: 0 } #target { margin-top: 100px; margin-left: 50px; width: 100px; height: 100px; background: blue; position: relative; } #target > div { position: absolute; width: 100px; height: 100px; background: green; } #bottom { top: 100px; left: 0px; } #right { top: 0px; left: 100px; } </style> <div id=target> <div id=bottom></div> <div id=right></div> </div>