# Additional CSS class for user-title?

**URL:** https://meta.discourse.org/t/additional-css-class-for-user-title/248998
**Category:** Feature
**Created:** [December 15, 2022, 5:32am UTC](https://meta.discourse.org/t/additional-css-class-for-user-title/248998 "2022-12-15T05:32:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jack\_Sparrow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jack_sparrow/32/244906_2.png) [@Jack\_Sparrow](https://meta.discourse.org/u/Jack_Sparrow)
#### Post date: [December 15, 2022, 5:32am UTC](https://meta.discourse.org/t/additional-css-class-for-user-title/248998/1 "2022-12-15T05:32:04Z")

</div>

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,

```plaintext
<span class="user-title badge-founder">Founder</span>

```

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [December 15, 2022, 5:53pm UTC](https://meta.discourse.org/t/additional-css-class-for-user-title/248998/2 "2022-12-15T17:53:42Z")

</div>

Seems like a reasonable addition to me!

I’ve opened a PR here:

[https://github.com/discourse/discourse/pull/19482](https://github.com/discourse/discourse/pull/19482)

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.

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [December 19, 2022, 1:00pm UTC](https://meta.discourse.org/t/additional-css-class-for-user-title/248998/3 "2022-12-19T13:00:03Z")

</div>

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