[openstreetmap/openstreetmap-website] Improve scaling and vertical alignment of browse icons (PR #5354)

Anton Khorev notifications at github.com
Sun Nov 24 17:56:27 UTC 2024


> vertical size to scale

Why do you need to scale the icons?

> they are being added using pseudo elements

That's what I was going to stop doing after #5317. I was going to write the icons as `<img>` or `<svg>`, set their size to 20x20 px, center them inside that size using `object-fit: none` (this lets the actual image to be smaller than 20x20, which is usually the case) and put them in `display: flex` element (possible after the inline icons inside "part of ways" are removed), they align fine with the text this way.

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

Message ID: <openstreetmap/openstreetmap-website/pull/5354/c2496138809 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241124/97797fd8/attachment.htm>


More information about the rails-dev mailing list