[openstreetmap/openstreetmap-website] Make element version scrollbar appear only when necessary (PR #6144)

Anton Khorev notifications at github.com
Sat Jun 28 16:29:26 UTC 2025


Mentioned in #6142, "Non-functional scrollbar".

This is for browsers that display scrollbars not only during scrolling. On Linux this is currently Chrome, but not Firefox.

If the version list is long enough to have the potentially scrollable part (currently >= 5 versions) but it fits in the sidebar entirely without scrolling, the scrollbar may still be visible.

![image](https://github.com/user-attachments/assets/527f117c-dbe6-4c8d-b615-10af6bb79e67)

This PR sets the horizontal overflow to `auto` instead of `scroll`, which hides the scrollbar when there's nothing to scroll.

![image](https://github.com/user-attachments/assets/e784e46c-5013-4fce-a8fd-8101a2678bb6)

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/6144

-- Commit Summary --

  * Make element version scrollbar appear only when necessary

-- File Changes --

    M app/helpers/numbered_pagination_helper.rb (2)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/6144.patch
https://github.com/openstreetmap/openstreetmap-website/pull/6144.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6144
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6144 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250628/7d1d6226/attachment-0001.htm>


More information about the rails-dev mailing list