You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Avatar in Button leadingVisual slot does not properly size img due to conflicting styles #7974
There’s a visual bug in the Button component: when passing an Avatar into the leadingVisual slot, the Avatar's image does not render with the correct width. This seems to be caused by a collision between global styles (e.g. img { max-width: 100% }) and less-specific Avatar styles (width: 20px via CSS var). Because Button uses min-content for the leadingVisual grid area, max-width sometimes resolves to 0, causing the image to shrink unexpectedly.
Setting min-width: var(--avatarSize-regular); alongside width on the Avatar CSS appears to solve the problem more generally, ensuring Avatars don’t shrink and always use the intended size.
Steps to reproduce
Render a Button component using an Avatar as the leadingVisual prop/value.
Hi, I'm starting my open-source contribution journey and would like to work on this issue. I'll first try to reproduce the problem and investigate the relevant component styles. Is this issue still available to work on?
Activity
shivambhardwaj06 commentedon Oct 11, 2026
Hi, I'm starting my open-source contribution journey and would like to work on this issue. I'll first try to reproduce the problem and investigate the relevant component styles. Is this issue still available to work on?