mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
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.
32 lines
676 B
HTML
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>
|