;
  width: 50px;
}

.sticky {
  position: sticky;
  top: 200px; /* Forces the sticky position element below the overflow. */
}
</style>

<div id="scroller1" class="container">
  <div class="sticky box"></div>
</div>

<script>
test(() => {
    var scroller = document.getElementById('scroller1');
    var sticky = scroller.querySelector('.sticky');

    var stickyOffset = sticky.offsetTop -
        scroller.scrollTop - scroller.offsetTop;
    assert_equals(stickyOffset, 50);
    assert_equals(scroller.scrollHe