[openstreetmap/openstreetmap-website] Rework sidebar to use padding on the sidebar_content div (#3224)

Andy Allan notifications at github.com
Wed Jun 16 14:32:20 UTC 2021


This PR was going to be a series of small CSS fixes, but is dominated by one in particular which is reworking the sidebar padding.

Until now, there's been no padding on the sidebar, so every piece of content has to sort out their own padding. For example, the header h2 normally have their own padding, and then either the sidebar content gets div-by-div padding or a class like browse-section was used all over the place.

Since there's only one or two places that we don't want the padding (namely in some lists) it's much easier to apply the padding globally and make exceptions for these cases. This should make the layout of the sidebar much easier to deal with in future, since it will work nicely by default if/when we add more sidebars.

The other changes in this PR are mostly self-explanatory.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Match the width of the overlay-sidebar on narrow screens to the width on full-sized screens
  * Rework the routing credit to use a bootstrap class
  * Rework sidebar to use padding on the sidebar_content div
  * Remove unused padding classes

-- File Changes --

    M app/assets/javascripts/index/browse.js (4)
    M app/assets/javascripts/index/directions.js (6)
    M app/assets/stylesheets/common.scss (55)
    M app/assets/stylesheets/small.scss (2)
    M app/views/application/_sidebar_header.html.erb (2)
    M app/views/browse/changeset.html.erb (2)
    M app/views/browse/new_note.html.erb (2)
    M app/views/browse/not_found.html.erb (2)
    M app/views/browse/note.html.erb (2)
    M app/views/browse/query.html.erb (6)
    M app/views/browse/timeout.html.erb (2)
    M app/views/changesets/history.html.erb (2)
    M app/views/changesets/index.html.erb (6)
    M app/views/geocoder/search.html.erb (4)
    M app/views/layouts/map.html.erb (4)
    M app/views/site/export.html.erb (6)

-- Patch Links --

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

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3224
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210616/34a6dc62/attachment.htm>


More information about the rails-dev mailing list