# Specific classes for category badges

**URL:** <https://meta.discourse.org/t/specific-classes-for-category-badges/15358>\
**Category:** Feature\
**Created:** [May 6, 2014, 4:22pm UTC](https://meta.discourse.org/t/specific-classes-for-category-badges/15358 "2014-05-06T16:22:19Z")\
**Posts on this page:** 4\
**Page:** 1

## AI-generated summary

[AdamCapriola](/t/-/15358/1) requests the ability to target specific category badges with CSS by including `category-ID` or `category-NAME` in the link class, aiming to use background images instead of solid colors for better visual harmony. [sam](/t/-/15358/2) confirms that this feature is supported and encourages Adam to submit a Pull Request, noting that the implementation is straightforward. Adam agrees to attempt the PR soon [AdamCapriola](/t/-/15358/3). He also suggests an alternative, more complex approach: adding a dedicated "add styling" option within the category editing interface. This alternative would ensure that custom styles persist in email digests, offering a more robust solution for users who cannot rely solely on CSS classes.

<div class="post-metadata">

**Author:** ![AdamCapriola](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adamcapriola/32/5192_2.png) [@AdamCapriola](https://meta.discourse.org/u/AdamCapriola)\
**Post date:** [May 6, 2014, 4:22pm UTC](https://meta.discourse.org/t/specific-classes-for-category-badges/15358/1 "2014-05-06T16:22:19Z")

</div>

I would like to use background images for my category badges (the solid colors bother me when I have a bunch of categories and can’t come up with a harmonious color scheme), but it looks like there isn’t a way to target specific category badges with CSS.

It would be nice if maybe the link class also included `category-ID` or `category-NAME` so category badges could be specifically targeted.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [May 8, 2014, 12:20am UTC](https://meta.discourse.org/t/specific-classes-for-category-badges/15358/2 "2014-05-08T00:20:03Z")

</div>

Sure, we support this. Care to try a PR to add this, its actually fairly simple to change.

---

<div class="post-metadata">

**Author:** ![AdamCapriola](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adamcapriola/32/5192_2.png) [@AdamCapriola](https://meta.discourse.org/u/AdamCapriola)\
**Post date:** [May 8, 2014, 7:08pm UTC](https://meta.discourse.org/t/specific-classes-for-category-badges/15358/3 "2014-05-08T19:08:17Z")

</div>

Sure, I will give it a try sometime soon. The other option, which would be more complicated, would be to have an “add styling” option on the “edit category” display. This might be better than adding a class for CSS targeting, because then the styling would carry over to the email digest.

---

<div class="post-metadata">

**Author:** ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)\
**Post date:** [December 4, 2025, 11:14am UTC](https://meta.discourse.org/t/specific-classes-for-category-badges/15358/5 "2025-12-04T11:14:23Z")

</div>

Archived on December 4, 2025, 11:14am UTC


