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개의 좋아요