Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#17309): set width and height for xl icon only avatars #17348

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bogatejc
Copy link

This pull request fixes #17309, which reports a bug where xlarge icon avatars are not centered within the component.

Root Cause

The .p-avatar-xl .p-avatar-icon class is missing the width and height properties, unlike the styles for large icon avatars.

Fix

This PR implements the following solution:

.p-avatar-xl .p-avatar-icon {
    font-size: ${dt('avatar.xl.font.size')};
    width: ${dt('avatar.lx.icon.size')};
    height: ${dt('avatar.lx.icon.size')};
}

Alternative Solution

An alternative approach would be adding display: contents to .p-avatar-icon. This would eliminate the need to define width and height for each size group. However, the implemented solution was chosen for its consistency with the existing styling patterns.

Closes #17309.

Copy link

vercel bot commented Jan 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview Jan 10, 2025 0:01am
primeng-v18 ⬜️ Ignored (Inspect) Visit Preview Jan 10, 2025 0:01am

Copy link

vercel bot commented Jan 10, 2025

Someone is attempting to deploy a commit to the primetek Team on Vercel.

A member of the Team first needs to authorize it.

@mertsincan mertsincan added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Icon avatars are not displayed correctly
2 participants