Need to target topics & author for CSS

(Lisa Wess) #1

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: {
    /* 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?

(Régis Hanol) #2

You can already do that using “data-topic-id” and “data-user-id:wink:

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

(Lisa Wess) #3

Thank you!! :allthethings:

(Lisa Wess) #4

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

(Kane York) #5

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 :confused:

(Lisa Wess) #6

Thank you @riking!

This can be closed out, appreciate all the help!

(Kane York) #7