# Styling based on group membership

**URL:** <https://meta.discourse.org/t/styling-based-on-group-membership/12031>\
**Category:** Feature\
**Created:** [2014 年 1 月 17 日午後 11:12 UTC](https://meta.discourse.org/t/styling-based-on-group-membership/12031 "2014-01-17T23:12:35Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [2014 年 1 月 17 日午後 11:12 UTC](https://meta.discourse.org/t/styling-based-on-group-membership/12031/1 "2014-01-17T23:12:35Z")

</div>

I think it would be pretty cool if we could get some CSS classes on posts based on what groups a user belongs to.

So, for example:

`<article class="boxed group-trust-level-2 group-bb-writers" ......>`

With a checkbox for whether or not the group shows up in the styling, in case we want private groups for some reason.

It would already be possible to do crazy CSS stuff with matching on `article[data-user-id=6626]`, but that would be very annoying to do for every user in the group.

---

_[View the full topic](https://meta.discourse.org/t/styling-based-on-group-membership/12031)._
