Files
ladybird/Tests/LibWeb/Ref/input/sticky-overflow-scroll.html
Tim Ledbetter 89cbe44c71 LibWeb: Apply scroll offset to children of sticky elements with overflow
Previously, sticky elements were excluded from propagating  their
scroll frame to descendants' accumulated visual context. This meant
that when a sticky element also had scrollable overflow, the scroll
offset was never visually applied to its children during painting.
2026-01-31 18:22:30 +01:00

32 lines
676 B
HTML

<!DOCTYPE html>
<link rel="match" href="../expected/sticky-overflow-scroll-ref.html">
<style>
body {
margin: 0;
}
.container {
position: sticky;
top: 0;
width: 100px;
height: 100px;
overflow-y: scroll;
scrollbar-width: none;
}
.top {
height: 100px;
background: red;
}
.bottom {
height: 100px;
background: green;
}
</style>
<div class="container">
<div class="top"></div>
<div class="bottom"></div>
</div>
<script>
// Scroll so the red part is hidden and only green is visible
document.querySelector('.container').scrollTop = 100;
</script>