# 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:** 1

<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, 12:54pm UTC](https://meta.discourse.org/t/css-selector-to-separate-posts-by-current-user/146267/1 "2020-03-31T12:54:34Z")

</div>

I am looking for a simple way for a CSS selector to match posts made by the current user (but not posts by other users). As far as I can tell, there is no CSS class added to such posts which I can use. But perhaps I am missing something?

If there is no such class at the moment, I would greatly appreciate if one was added!

My suggestion would be to add a class to the `topic-post` element, similar to the currently existing classes relating to the posting user, e.g. `topic-owner`. The new class could be `current-user` or `my-post` or whatever fits with existing Discourse nomenclature.

> **Click here for an explanation of why I want to do this...**
>
> Some time ago users of my forum complained about getting addicted to checking how many likes their posts have received. They went back to posts repeatedly just to check their likes and this behavior reminded them of the more toxic aspects of the mainstream social media platforms.
> 
> My solution was to create a theme for them to use where I simply added a CSS rule to hide the like counter on their posts. The like button on posts created by the current user has a class called `.my-likes`, so it is easy to select with CSS. This worked well and the users were happy with the solution.
> 
> However, earlier today it was pointed out to me that if you click the “…”-button, i.e. “show more” on a post, the users who have liked that post are listed. One user reported that he was back in his “dopamine junkie” ways because of this, repeatedly clicking “…” to circumvent the special theme and check his likes.
> 
> But unlike the above mentioned case of the like button, I can not find a CSS selector which lets me do this. The only solution I have found is to hide the list of likers for all posts, i.e. making it so that the users of the theme can not see that list for any post.
> 
> What I can do now is this:
> 
> `.who-liked { display: none;}`
> 
> What I hoped to do was something like this:
> 
> `.topic-post.current-user .who-liked { display: none;} `
> 
> (But this does not work, because the `.current-user` class does not exist.)

---

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