diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp index 6fd2fc27e85..7c1d840be16 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -286,8 +286,10 @@ Optional PaintableBox::compute_scrollbar_data(Scrol auto scrollport_size = direction == ScrollDirection::Horizontal ? padding_rect.width() : padding_rect.height(); if (scroll_overflow_size == 0) return {}; - auto const min_thumb_length = 50; + + auto min_thumb_length = min(scrollport_size, 24); auto thumb_length = max(scrollport_size * (scrollport_size / scroll_overflow_size), min_thumb_length); + CSSPixelFraction scroll_size = 0; if (scroll_overflow_size > scrollport_size) scroll_size = (scrollport_size - thumb_length) / (scroll_overflow_size - scrollport_size);