mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-29 19:10:26 +00:00
b821f7b283
Introduces the rendering of scroll thumbs in vertical and horizontal directions. Currently, the thumbs are purely graphical elements that do not respond to mouse events. Nevertheless, this is beneficial as it makes it easier to identify elements that should respond to scrolling events. Painting of scrollbars uncovers numerous bugs in the calculation of scrollable overflow rectangles highlighting all the places where elements are made scrollable whey they shouldn't be. Positively, this issue might motivate us to pay more attention to this problem to eliminate unnecessary scrollbars. Currently, the scrollbar style is uniform across all platforms: a semi-transparent gray rectangle with rounded corners. Also here we add `scrollbar-width: none` to all existing scrolling ref-tests, so they keep working with this change.
30 lines
718 B
HTML
30 lines
718 B
HTML
<!DOCTYPE html>
|
|
<link rel="match" href="reference/abspos-escapes-scroll-container-ref.html" />
|
|
<style>
|
|
#scrollable-box {
|
|
width: 300px;
|
|
height: 200px;
|
|
overflow: auto;
|
|
border: 1px solid black;
|
|
scrollbar-width: none;
|
|
}
|
|
.content {
|
|
height: 600px;
|
|
}
|
|
.absolute-element {
|
|
position: absolute;
|
|
top: 10px;
|
|
right: 10px;
|
|
background-color: yellow;
|
|
}
|
|
</style>
|
|
<div id="scrollable-box">
|
|
<div class="content"><span><span>Content that makes the container scrollable...</span></span></div>
|
|
<div class="absolute-element">
|
|
Abspos Element
|
|
</div>
|
|
</div>
|
|
<script>
|
|
const scrollContainer = document.getElementById("scrollable-box");
|
|
scrollContainer.scrollTop = 500;
|
|
</script>
|