How do I customise the styling of "solved topics" in the main list?

(Jérôme Bouvard) #1

Perfect plugin for me :smile:
How can I change the background color of a solved topic on the main page ?
Like some nice green to show everyone that this topic has a solution !

Discourse Solved (Accepted answer plugin)
(Jeff Atwood) #2

You should be able to do it by targetting the post class via CSS.

(Michael Downey) #3

Are you talking about the main list of all topics? If so, I don’t think this is possible.

If it’s on the topic page itself, AFAIK this is not possible either, because the only change to the “question” (first post) is the insertion of a paragraph in the post. You can style the post of the accepted solution, though, with CSS.

If someone knows a way, please share it because I also spent some time trying to do this. :wink:

(Sam Saffron) #4

I never added support for that, but on the actual topic page you can easily change it with

.topic-post.accepted-answer .topic-body {
  background-color: #E9FFE0;

(Alex Salvador) #5

Sorry for reviving this very old topic, but I had the exact same question :

Is changing the background color of solved topic on the main page now supported ?
We would like to make it more visible on topic lists / search results if a topic has an accepted answer or not.

(Sam Saffron) #6

No we do not yet decorate rows in the topic list with a .solved class. Not against adding this if we can do that with no performance impact.