Adding category class names to the table rows in the category-list seems like a good idea - the topic-list has them.
Discourse could whitelist a class for divs and spans that was something like custom-class-(class-number) with class-number being any digit. The classes generated from that (custom-class-1, custom-class-2, etc.) could then be defined with custom css, or used to target a post with javascript.
To do that, maybe you could define a css rule that works on multiple selectors:
.category-this,
.category-that {
display: none;
}