Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<title>Anchored element should update when anchor's div under `contain: layout size` becomes a scroll container.</title>
<link rel="author" href="mailto:dshin@mozilla.com">
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/">
<style>
.abspos-cb {
position: relative;
width: 200px;
height: 200px;
border: 1px solid;
}
.flex {
display: flex;
}
.positioned {
width: 15px;
height: 15px;
background: purple;
}
.anchor {
width: 15px;
height: 15px;
background: magenta;
}
</style>
<div class=abspos-cb>
<div class=flex>
<div class=anchor></div><div class=positioned></div>
</div>
</div>