Additional CSS class for user-title?

We are awarding a limited badge for our first 1k members. So we would like to encourage them to show off their special badge. I tried to design user-title and was surprised to see that that does’nt have any css that indicates the content inside so we can not target specific badge in css.

<span class="user-title">Founder</span>

An additional class would be nice, like,

<span class="user-title badge-founder">Founder</span>
4 Likes

Seems like a reasonable addition to me!

I’ve opened a PR here:

This will add a user-title--title-name and if the title is owned by a group a user-title--group-name class to the user title. So given the title founder, you’ll get user-title--founder.

Update: this has been merged, so these classes should be available the next time you update Discourse.

3 Likes

This topic was automatically closed after 3 days. New replies are no longer allowed.