Is it possible to increase the size of a group flair?

AI-generated summary

Increasing Group Flair Size

STORMS asked if it’s possible to increase the size of group flairs in Discourse. Lilly provided a CSS code snippet to resize the flair from 40px to 60px.

.user-card-avatar .avatar-flair, .user-profile-avatar .avatar-flair {
    background-size: 60px 60px;
    width: 60px;
    height: 60px;
}

Lilly later updated the code to also include resizing the flair in posts from 20x20 to 30x30.

.topic-avatar .avatar-flair, 
.avatar-flair-preview .avatar-flair, 
.collapsed-info .user-profile-avatar .avatar-flair, 
.user-image .avatar-flair, 
.latest-topic-list-item .avatar-flair {
    background-size: 30px 30px;
    width: 30px;
    height: 30px;
}

Lilly created a theme component to make it easier to adjust the flair size, available on GitHub: https://github.com/Lillinator/custom-avatar-flair-size.git.

Additional Discussion

JammyDodger suggested that this feature could be a good addition to the existing topic on avatar size and shape. Lilly considered integrating the feature, but noted that it would require further development.

STORMS asked if it’s possible to set perimeters around “stacking” flair, allowing users to stack multiple flairs based on group membership. Lilly mentioned that flairs are not currently viewable in chat and directed STORMS to an existing feature request: https://meta.discourse.org/t/avatar-flairs-in-chat/320235

Is there an easy way to increase the size of the flair that goes by your name when attached to certain groups?

.
Screenshot 2024-08-19 094148

In common - css of a theme or component. you can do something like this

Avatar flair resized from the default 40px to 60px:

.user-card-avatar .avatar-flair, .user-profile-avatar .avatar-flair {
    background-size: 60px 60px;
    width: 60px;
    height: 60px;
}

default 40 px

60 px

Can change flair location with this component:

Do I have it in the right place?

looks like it. (is there something else in the header tab that’s highlighted?)

code I posted should be here:

Yep, it’s all there. The flair is still 20x20 in posts.

oh sorry I missed the post one. :woman_facepalming:t2:

For 30px

.user-card-avatar .avatar-flair, .user-profile-avatar .avatar-flair {
    background-size: 60px 60px;
    width: 60px;
    height: 60px;
}

.topic-avatar .avatar-flair, 
.avatar-flair-preview .avatar-flair, 
.collapsed-info .user-profile-avatar .avatar-flair, 
.user-image .avatar-flair, 
.latest-topic-list-item .avatar-flair {
    background-size: 30px 30px;
    width: 30px;
    height: 30px;
}

default 20px

30px

Thank you! I’m definitely not a coder, so I appreciate the support & assist! :slight_smile:

no problem. you can fine tune adjust that px sizing to granularly get it how you want. :slight_smile:

I noticed if I put a HEX color on it, it shrinks back down. Can you assist me here also :slight_smile:

yea ok to make it easier for you and others to do this, I fired up a quick theme component:

https://github.com/Lillinator/custom-avatar-flair-size.git

Let me know how it works :slight_smile: :wrench:
You still have to change the flair image and background color in the group avatar flair settings. This component just provides some basic settings for sizing the image flairs and their background circles. Desktop only though - I tried some mobile stuff, but it wasn’t worth tweaking for that small.

Would this make a good addition to Avatar Size and Shape?

oh I forgot about that one. does it do the same thing? oh nm, it’s just avatars, I thought it did flairs too. hmmm :thinking: might not be a bad idea…

mine is pretty basic that I threw together in a few min. I think I’d want to change the input fields format perhaps.

I think it’s currently only for avatars, but group flairs seem ‘adjacent’ if this could be folded in. I’d have to fire it up to check though.

@Lilly is it also possible to set perimeters around “stacking” flair? For what I have in mind, it would be beneficial for users to be able to stack several, based on “kinds” of groups they’re in.

@Lilly why does flair disappear for me when in chat? Is there an easy way to have flair show in chats?

As far as I know, flairs have never been viewable in chat. You could always add a post to the existing feature request :slight_smile: