[openstreetmap/openstreetmap-website] Use Bootstrap .icon-link in shared pagination (PR #4706)

Anton Khorev notifications at github.com
Tue Apr 16 15:13:14 UTC 2024


There is a [Bootstrap class](https://getbootstrap.com/docs/5.3/helpers/icon-link/) for displaying icons next to links. Shared pagination has "<"/">" icons which could be attached using this class. But initially I didn't use it because it's named a bit deceptively.

When we're on the first page, there's no link to the previous page yet we still want to attach the icon to the text in the disabled page item. Will `.icon-link` work in this case, without a link? Yes it will, Bootstrap [doesn't check](https://github.com/twbs/bootstrap/blob/ad0cc68b7e226d9e1c1feb39ca68c0404c304365/scss/helpers/_icon-link.scss#L1) if `.icon-link` is used on a link or on anything else.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Remove unnecessary .d-flex from shared pagination
  * Use .icon-link in shared pagination

-- File Changes --

    M app/views/shared/_pagination.html.erb (10)

-- Patch Links --

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

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

Message ID: <openstreetmap/openstreetmap-website/pull/4706 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240416/60d08989/attachment.htm>


More information about the rails-dev mailing list