# Customized CSS based on user role/groups

**URL:** <https://meta.discourse.org/t/customized-css-based-on-user-role-groups/281766>\
**Category:** Development\
**Tags:** css\
**Created:** [October 10, 2023, 2:20pm UTC](https://meta.discourse.org/t/customized-css-based-on-user-role-groups/281766 "2023-10-10T14:20:43Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [October 10, 2023, 3:23pm UTC](https://meta.discourse.org/t/customized-css-based-on-user-role-groups/281766/6 "2023-10-10T15:23:53Z")

</div>

`.anon` is all anonymous users. I don’t think .admins or .moderators works unless you install the component. It’s not a lot of code and can easily be added to another component too. I do this with my related theme components so people don’t have to install both. What’s great about that group CSS component is it allows targeting trust levels as well.

You can see how I use .staff and .anon in one of my theme components [here](https://github.com/Lillinator/navigation-menu-display-control/blob/main/common/common.scss).

---

_[View the full topic](https://meta.discourse.org/t/customized-css-based-on-user-role-groups/281766)._
