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

feat(avatar): add more size option #475

Merged
merged 1 commit into from
Feb 20, 2024
Merged

feat(avatar): add more size option #475

merged 1 commit into from
Feb 20, 2024

Conversation

kiaking
Copy link
Member

@kiaking kiaking commented Feb 20, 2024

Add more size option to <SAvatar>.

  • jumbo - 48px big. Adding this to be more consistent with <SButton> sizing.
  • fill - Custom size that fills the parent container. When we want avatar bigger than 48px, use this.

One issue with fill option is that it's hard to set font-size for name initial when the user don't have avatar image.

@brc-dd
Do you know any tricks to like set font size dynamically based on parent container? If not, I think we can stick to font-size: 20px I've set. We should only use fill when we need big avatar and that's quite rare case so 👀

@kiaking kiaking added the enhancement New feature or request label Feb 20, 2024
@kiaking kiaking requested a review from brc-dd February 20, 2024 05:57
@kiaking kiaking self-assigned this Feb 20, 2024
Copy link

netlify bot commented Feb 20, 2024

Deploy Preview for sefirot-story ready!

Name Link
🔨 Latest commit 4bf8c62
🔍 Latest deploy log https://app.netlify.com/sites/sefirot-story/deploys/65d43f5d95d29a00089b4e44
😎 Deploy Preview https://deploy-preview-475--sefirot-story.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@brc-dd
Copy link
Member

brc-dd commented Feb 20, 2024

container queries 😅

Copy link

netlify bot commented Feb 20, 2024

Deploy Preview for sefirot-docs ready!

Name Link
🔨 Latest commit 4bf8c62
🔍 Latest deploy log https://app.netlify.com/sites/sefirot-docs/deploys/65d43f5dceb2620008b43fc3
😎 Deploy Preview https://deploy-preview-475--sefirot-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kiaking
Copy link
Member Author

kiaking commented Feb 20, 2024

Uhhhh can we use that now? 😳

@brc-dd
Copy link
Member

brc-dd commented Feb 20, 2024

Yeah similar support to :has()

Or just set font-size on .SAvatar and use em on .initial

@kiaking
Copy link
Member Author

kiaking commented Feb 20, 2024

OK tested several things but yeah it's too complicated... I guess we can go with fixed 24px. Because the font shouldn't be too big, and not too small and so hard to maintain 😅

@kiaking kiaking merged commit b118e27 into main Feb 20, 2024
9 checks passed
@kiaking kiaking deleted the avatar-more-sizes branch February 20, 2024 06:37
@DhairyaMajmudar DhairyaMajmudar mentioned this pull request Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants