[openstreetmap/openstreetmap-website] More padding for menu items on mobile devices (PR #6730)

Roman Deev notifications at github.com
Sun Feb 1 20:51:50 UTC 2026


deevroman left a comment (openstreetmap/openstreetmap-website#6730)

While I was trying to add the classes, I realized that it was actually only adding two classes to the `<li>`, which looks better than something like:

```erb
<%= tag.li :class => header_nav_item_class do %>
  ... 
<% end %>
```

Additionally, `header_nav_link_class` can return different classes depending on the current page. `header_nav_item_class` would return a constant.

---

Since we are removing the custom style for `.nav-link`, `"px-1", "py-0"` needs to be added to `header_nav_link_class`.

---

One more note, I had to add manipulation with new classes in JS, the links in the dropdown and in the header should have different paddings

---

Finally, `.3rem` has no equivalent in Bootstrap, so the indentation between links has become slightly smaller:


https://github.com/user-attachments/assets/eed6520c-d3a4-4d59-ba4d-3af64e8abee3



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

Message ID: <openstreetmap/openstreetmap-website/pull/6730/c3831994321 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260201/7acf59df/attachment.htm>


More information about the rails-dev mailing list