SYNTAX: Use classes instead of html element targeting (PR #14890)

In prep for moving the topic list html elements over to divs instead of tables, I think it would be smart to first add the upcoming classes into the current html elements.

I will then be able to make PRs to all themes and components to change their targets to these new classes, and once the topic-list is refactored, the themes / components will have a much lower chance of breaking or manifesting any odd visual bugs.


Nitpicking (but could be important because CSS specificity matters), you like don’t need this change (the other selectors here also target the table rows).

Nitpicking again, but I would rather use topic-list-row because item and data can be more easily confused with each other.

I found through testing I needed to add the specificity here, because once a topic was visited, these changed were not being applied to visited rows. Adding topic-list-data to be more specific solved the issue.

addressed here: SYNTAX: Use topic-list-row to minimize confusion by jordanvidrine · Pull Request #14956 · discourse/discourse · GitHub

Hmm, that shouldn’t be the case. Do you mean there is a separate regression here?

Oh I think you are right. visited is a class added to topic-list-item. Here we are checking for visited to be on the link, which I dont believe it is anymore.

For instance, Im not sure these lines apply to anything discourse/_topic-list.scss at 0e371d4c6dbd0f3d30e6ac5c17de5ead726ffa5e · jordanvidrine/discourse · GitHub