Status: PASS | Duration: 7ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-anchor-position/position-visibility-anchors-visible-in-overflow.html
<!DOCTYPE html> <meta charset="utf-8"> <meta name="assert" content="A position-visibility: anchors-visible element should be visible if the anchor is under overflow: visible." /> <title>CSS Anchor Positioning Test: position-visibility: anchors-visible in overflow</title> <link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#position-visibility"> <link rel="match" href="position-visibility-anchors-visible-in-overflow-ref.html"> <style> #outer-container { width: 100px; height: 100px; overflow: visible; position: relative; } #inner-container { width: 100px; height: 100px; overflow: visible; position: relative; } #anchor { anchor-name: --anchor; position: relative; margin-left: 200px; width: 100px; height: 100px; background: orange; } #spacer { height: 200px; } #target-a { position-anchor: --anchor; position-visibility: anchors-visible; position-area: top left; width: 50px; height: 50px; background: green; position: absolute; inset: 0; } #target-b { position-anchor: --anchor; position-visibility: anchors-visible; position-area: center left; width: 50px; height: 50px; background: green; position: absolute; inset: 0; } #target-c { position-anchor: --anchor; position-visibility: anchors-visible; position-area: bottom left; width: 50px; height: 50px; background: green; position: absolute; inset: 0; } </style> <div id="outer-container"> <div id="inner-container"> <div id="spacer"></div> <div id="anchor">anchor</div> <div id="target-a">target-a</div> </div> <div id="target-b">target-b</div> </div> <div id="target-c">target-c</div>
/css/css-anchor-position/position-visibility-anchors-visible-in-overflow-ref.html
<!DOCTYPE html> <meta charset="utf-8"> <style> #outer-container { width: 100px; height: 100px; overflow: visible; position: relative; } #inner-container { width: 100px; height: 100px; overflow: visible; position: relative; } #anchor { anchor-name: --anchor; position: relative; margin-left: 200px; width: 100px; height: 100px; background: orange; } #spacer { height: 200px; } #target-a { position-anchor: --anchor; position-visibility: anchors-visible; position-area: top left; width: 50px; height: 50px; background: green; position: absolute; inset: 0; } #target-b { position-anchor: --anchor; position-visibility: anchors-visible; position-area: center left; width: 50px; height: 50px; background: green; position: absolute; inset: 0; } #target-c { position-anchor: --anchor; position-visibility: anchors-visible; position-area: bottom left; width: 50px; height: 50px; background: green; position: absolute; inset: 0; } </style> <div id="spacer"></div> <div id="anchor">anchor</div> <div id="target-a">target-a</div> <div id="target-b">target-b</div> <div id="target-c">target-c</div>