Add CSS class containing tag group

I’d like to be able to style all tags within a certain tag group. It would be really handy if everywhere the tag-X CSS class exists, we could also have tag-group-X (where the tag belongs to a group.

In my local forum, I have tags for each road, all belonging to a group called “roads” - I’d like to be able to style all road tags, and avoid having to edit my CSS every time I add a new road tag.

「いいね!」 3

Is this possible @neil?

We don’t fetch tag groups when rendering topics. They’re only useful when composing new topics. It’s technically possible, but can’t be done easily currently.

「いいね!」 5

Hi, this might be cool logical feature. Currently Discourse has a great option Tag groups, but the ability to use its benefit like custom coloring for groups is missed now. If the group has it own class, it will be easy to apply single CSS for a group of tags.

For those who wants to apply custom style to some tag (css tag):

.tag-css.discourse-tag.box {
background-color: #ff9a1e;
color: #242424;
}
「いいね!」 2

This request just came up in a discussion I was having. This site wants to color tags, but not need to modify their CSS every time a new tag is added, they’d prefer to simply add the tag to a tag group.

「いいね!」 6

このトピックを再浮上させたい気分です :grinning:

私たちの基本的なユースケースは、ここで言及されているものとほぼ同じです:

また、トピックタグとその対応するタググループを返す変数に基づいて、ウィジェットの魔法を適用することも可能にしたいと考えています。

「いいね!」 3

それを見るのも楽しみです!ジャーナル/レポートセクションには、多くのタグを使用しています。/latest から特定のタググループを非表示にできるといいですね。

「いいね!」 2