Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<html reftest-async-scroll>
<style>
.scroller {
position: absolute;
left: 0;
top: 0;
overflow: auto;
scrollbar-width: none;
width: 150px;
height: 100px;
}
.spacer {
width: 1px;
height: 100px;
}
.largespacer {
width: 1px;
height: 500px;
}
.anchor {
width: 50px;
height: 50px;
background: blue;
anchor-name: --my-anchor;
}
#popover {
margin: 0;
border: none;
padding: 0;
overflow: visible;
position: absolute;
position-anchor: --my-anchor;
position-visibility: always;
left: anchor(right);
top: anchor(top);
width: 50px;
height: 50px;
background: yellow;
}
#popover > div {
position: absolute;
left: 0;
top: 0;
width: 10px;
height: 10px;
background: green;
}
</style>
<div class="scroller"
reftest-displayport-x="0" reftest-displayport-y="0"
reftest-displayport-w="150" reftest-displayport-h="500"
reftest-async-scroll-y="50">
<div class="spacer"></div>
<div class="anchor"></div>
<div class="largespacer"></div>
</div>
<div id="popover" popover><div></div></div>
<script>
document.getElementById("popover").showPopover();
</script>
</html>