boringdesigners / boring-avatars

Boring avatars is an open source React library that generates custom, SVG-based avatars from any username and color palette.
https://boringavatars.com
MIT License
5.65k stars 198 forks source link

Make mask ids unique to avatar instances #49

Closed bfischer1121 closed 2 years ago

bfischer1121 commented 2 years ago

Why

If an app has multiple instances of the same type of avatar on the page and one of those avatars is hidden, the visible avatar may reference the hidden avatar's mask element as its own mask. This results in the visible avatar no longer being circular because the mask no longer has effect. Tested in chrome.

How

PR is just a POC for avatar-pixel

github-actions[bot] commented 2 years ago

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

suntudo commented 1 year ago

Hi there, could you please accept this PR? I just ran into this issue and was really stumped till I found this. Love the avatars! Thanks