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">
<style>
.abspos-cb {
  position: relative;
  width: 200px;
  height: 200px;
  border: 1px solid;
}
.flex {
  display: flex;
}
.positioned {
  width: 15px;
  height: 15px;
  background: purple;
}
.scroller {
  overflow-y: scroll;
  height: 100%;
}
.anchor {
  width: 15px;
  height: 15px;
  background: magenta;
}
.filler {
  width: 1px;
  height: 500px;
}
</style>
<div class=abspos-cb>
  <div id=dut class=scroller>
    <div class=filler></div>
    <div class=flex>
      <div class=anchor></div>
      <div class=positioned></div>
    </div>
  </div>
</div>
<script>
dut.scrollTop = 315;
</script>