r-universe-org / help

Support and bug tracker for R-universe
https://docs.r-universe.dev/
9 stars 2 forks source link

Package version badge image has invisible padding #493

Open mccarthy-m-g opened 4 hours ago

mccarthy-m-g commented 4 hours ago

Problem

The badge for package versions has invisible padding, rather than being cropped to the edges of the badge. On desktop this is hard to notice, but on small screens it can lead to a row of badges being indented, which looks sloppy. I've included screenshots below. Here's a link to the repo if you find the screenshots unclear: https://github.com/mccarthy-m-g/palettes/

Screenshots

The badge for package versions has invisible padding rather than being cropped to the edges of the badge:

Screen Shot 2024-09-19 at 11 36 55 AM

Compare this to other badges, which are cropped to the edges of the badge:

Screen Shot 2024-09-19 at 11 37 07 AM

On desktop this is hard to notice, but on small screens it can lead to a row of badges being indented, which looks sloppy:

Screen Shot 2024-09-19 at 11 37 53 AM

jeroen commented 4 hours ago

I don't see what you mean. Perhaps it is an artifact of how github converts the svg badge? If I zoom in all the way I don't see any difference in margins with the other badges.

Perhaps you can look in chrome devtools what css is causing the extra margin in your case? Do you have any browser plugins that modify github page somehow? Do you see this in other browsers as well?

Screen Shot 2024-09-19 at 9 12 02 PM

mccarthy-m-g commented 4 hours ago

I’m using Firefox on desktop and Safari on mobile. No plugins modifying GitHub with either browser. The padding is in the badge image itself, it isn't CSS padding, and it only affects the r-universe badge (all the other badges are cropped to edge properly). It might be an artifact of the SVG conversion, but it's weird that it's only affecting one badge.

Here’s a mobile screenshot, where it’s very clear:

IMG_8670