# CSS selector to separate posts by current user

**URL:** <https://meta.discourse.org/t/css-selector-to-separate-posts-by-current-user/146267>\
**Category:** Development\
**Created:** [March 31, 2020, 12:54pm UTC](https://meta.discourse.org/t/css-selector-to-separate-posts-by-current-user/146267 "2020-03-31T12:54:34Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![meriksson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meriksson/32/66712_2.png) [@meriksson](https://meta.discourse.org/u/meriksson)\
**Post date:** [March 31, 2020, 5:53pm UTC](https://meta.discourse.org/t/css-selector-to-separate-posts-by-current-user/146267/5 "2020-03-31T17:53:54Z")

</div>

Thank you for the replies!

I am well aware that I can do this with Javascript. I should have mentioned that from the start. However, the point of my post is that I would like to do it in a much simpler way, with a tiny bit of CSS (see the expandable part of my original post).

Besides being a simpler and more natural solution, it would let me manage things with the excellent built-in system for Themes and Theme Components.

And it is not like this would be some weird exotic thing. As I mentioned initially, Discourse already has class attributes on the very same element (post on topic page) for indicating properties of the posting user (topic-owner, trust level, group memberships etc). And in a sub-element of this element (the like button), there is already a class attribute indicating that the post is made by the user who is currently accessing the page.

For these reasons, I think adding that single attribute on the topic-post element is a much better solution than some Javascript hack.

---

_[View the full topic](https://meta.discourse.org/t/css-selector-to-separate-posts-by-current-user/146267)._
