# CSS username colors only working for admin/moderators?

**URL:** https://meta.discourse.org/t/css-username-colors-only-working-for-admin-moderators/315045
**Category:** Development
**Tags:** css
**Created:** [July 4, 2024, 8:05pm UTC](https://meta.discourse.org/t/css-username-colors-only-working-for-admin-moderators/315045 "2024-07-04T20:05:38Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [July 5, 2024, 1:07am UTC](https://meta.discourse.org/t/css-username-colors-only-working-for-admin-moderators/315045/7 "2024-07-05T01:07:08Z")

</div>

If you want to target custom groups, you need to install this theme component, as stated by Moin: [CSS Classes for Current User's Groups](https://meta.discourse.org/t/css-classes-for-current-users-groups/226068). It will insert the current user’s groups into the `body` HTML.

Then, you can target with `.group-NAME`:

```css
.group-NAME {
  .names {
     span a::after {
       content:"★";
       margin-left: 2px;
     }
  }
}

```

---

_[View the full topic](https://meta.discourse.org/t/css-username-colors-only-working-for-admin-moderators/315045)._
