Differentiate contents from the topic list rows using different colors

Hi Renato :wave:

You can target these elements with your browser’s dev tools, you can read about it here:

https://meta.discourse.org/t/make-css-changes-on-your-site/168101#browser-inspection-tools-7

However, how these elements are styled use many different selectors through nesting from the original SCSS code.

I’d start with the compiled CSS and tweak it if it has unintended effects:

Topics with unread posts:

# titles
.topic-list-main-link a.title,
.latest-topic-list-item .main-link a.title,
.topic-list .main-link a.title {
    color: var(--primary);
}

# categories
.badge-wrapper.bullet span.badge-category {
    color: var(--primary-high);
}

# tags
.topic-list-item.visited .topic-list-data a.discourse-tag, .latest-topic-list-item.visited a.discourse-tag, .category-topic-link.visited a.discourse-tag {
    color: var(--primary-medium);
}

Visited topics:

# titles
.topic-list-item.visited .topic-list-data a.title:not(.badge-notification),
.latest-topic-list-item.visited a.title:not(.badge-notification),
.category-topic-link.visited a.title:not(.badge-notification) {
    color: var(--primary-medium);
}

# categories
.topic-list-item.visited .topic-list-data span.badge-category,
.latest-topic-list-item.visited span.badge-category,
.category-topic-link.visited span.badge-category {
    color: var(--primary-medium);
}

#tags
.topic-list-item.visited .topic-list-data a.discourse-tag,
.latest-topic-list-item.visited a.discourse-tag,
.category-topic-link.visited a.discourse-tag {
    color: var(--primary-medium);
}

Excerpts have no specific style for visited topics (but it can be tweaked with additional CSS).

.topic-list .topic-excerpt {
    color: var(--primary-high);
}
2 Likes