[openstreetmap/openstreetmap-website] Put layer selection buttons into bootstrap row to have two cols on smaller screens (PR #3629)
Anton Khorev
notifications at github.com
Wed Jul 27 00:08:36 UTC 2022
If you really want to avoid depending on some specific minimal safe button width, a possible fix for that is to gradually decrease the label font size. That's more custom css however.
You'd change font size here
https://github.com/openstreetmap/openstreetmap-website/blob/e9887f88edf37ec164bb4373f7bcb86262b781b6/app/assets/stylesheets/common.scss#L509
to something like
font-size: clamp(12px, calc(12px + 4/500 * (100vw - 268px)), 16px);
which can be made more readable by declaring variables (4 is a difference between font sizes, 500+268 is the breakpoint for layers panel to go full screen width).
Or do a less weird thing and put one custom width media query when the button becomes smaller than ~180px and make the font size smaller. That's about 420px. This is assuming that whoever made translations for layer names tried to make them fit in the original button size. Anyway the label font size now is quite large - 16px - which becomes noticeable once it moves under the OSM logo with font size 18px.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3629#issuecomment-1196115142
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3629/c1196115142 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220726/bdc012f6/attachment.htm>
More information about the rails-dev
mailing list