# Need to target topics & author for CSS

**URL:** https://meta.discourse.org/t/need-to-target-topics-author-for-css/33027
**Category:** Feature
**Created:** [September 8, 2015, 5:56pm UTC](https://meta.discourse.org/t/need-to-target-topics-author-for-css/33027 "2015-09-08T17:56:57Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![lisajill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lisajill/32/32289_2.png) [@lisajill](https://meta.discourse.org/u/lisajill)
#### Post date: [September 8, 2015, 5:56pm UTC](https://meta.discourse.org/t/need-to-target-topics-author-for-css/33027/1 "2015-09-08T17:56:57Z")

</div>

We have a need to target individual topics by CSS to highlight authors in specific ways **for individual threads**. The ultimate goal here is to make specific authors more visible in topics with many replies - but only in that thread.

So for instance, if we were having a question/answer session in this thread there might be a specific expert responding but that person should be ‘normal’ in the rest of the forums. So we would need two new classes for each **topic** (full thread including replies)

- Class for each author (their username would be ideal)
- Class for the topic ID

This would enable use to use something like this:

```
div.abc.xyz {
    /* rules go here */
}

```

to get very specific within-topic targeting. This would also allow us to highlight multiple ‘experts’ per thread as needed.

By category/group is not specific enough in this case. Can we get more granular?

I understand we’d need to add those rules for each topic in the Customize section which is perfect for our need.

Any chance this could be added?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [September 8, 2015, 6:05pm UTC](https://meta.discourse.org/t/need-to-target-topics-author-for-css/33027/2 "2015-09-08T18:05:31Z")

</div>

You can already do that using “`data-topic-id`” and “`data-user-id`” 😉

```stylesheet
[data-topic-id="33027"] {
  [data-user-id="1995"] {
    /* rules goes here */
  }
}

```

---

<div class="post-metadata">

### Author: ![lisajill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lisajill/32/32289_2.png) [@lisajill](https://meta.discourse.org/u/lisajill)
#### Post date: [September 8, 2015, 7:44pm UTC](https://meta.discourse.org/t/need-to-target-topics-author-for-css/33027/3 "2015-09-08T19:44:59Z")

</div>

**Thank you!!** :allthethings:

---

<div class="post-metadata">

### Author: ![lisajill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lisajill/32/32289_2.png) [@lisajill](https://meta.discourse.org/u/lisajill)
#### Post date: [September 8, 2015, 7:45pm UTC](https://meta.discourse.org/t/need-to-target-topics-author-for-css/33027/4 "2015-09-08T19:45:49Z")

</div>

Oh! Quick q: where do I find the user ID?

---

<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: [September 8, 2015, 7:51pm UTC](https://meta.discourse.org/t/need-to-target-topics-author-for-css/33027/5 "2015-09-08T19:51:48Z")

</div>

Go to the user page, put `.json` on the end of the url, and look for `"user":{"id":123,` . It’ll be around the middle of the response 😕

---

<div class="post-metadata">

### Author: ![lisajill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lisajill/32/32289_2.png) [@lisajill](https://meta.discourse.org/u/lisajill)
#### Post date: [September 8, 2015, 8:29pm UTC](https://meta.discourse.org/t/need-to-target-topics-author-for-css/33027/6 "2015-09-08T20:29:53Z")

</div>

Thank you @riking!

This can be closed out, appreciate all the help!

---

<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: [September 8, 2015, 8:31pm UTC](https://meta.discourse.org/t/need-to-target-topics-author-for-css/33027/7 "2015-09-08T20:31:33Z")

</div>


