# Inline category badge styles - Change to Stylesheet

**URL:** https://meta.discourse.org/t/inline-category-badge-styles-change-to-stylesheet/23787
**Category:** Feature
**Created:** [08.Январь.2015 18:12:59 UTC](https://meta.discourse.org/t/inline-category-badge-styles-change-to-stylesheet/23787 "2015-01-08T18:12:59Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![strager](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@strager](https://meta.discourse.org/u/strager)
#### Post date: [08.Январь.2015 18:12:59 UTC](https://meta.discourse.org/t/inline-category-badge-styles-change-to-stylesheet/23787/1 "2015-01-08T18:12:59Z")

</div>

@Bill_S pointed this out to me this morning…

There shouldn’t be any inline styles. Otherwise, we cannot style those particular elements. Can we get them moved to the style sheet? Please?

 ![](https://global.discourse-cdn.com/meta/original/3X/4/e/4e317712c9e13dfa73442513f926dbfdd94fce53.png)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [08.Январь.2015 21:12:48 UTC](https://meta.discourse.org/t/inline-category-badge-styles-change-to-stylesheet/23787/2 "2015-01-08T21:12:48Z")

</div>

This is not a bug, those colors are set via the category preferences as in “this is the color that represents this category”. To change them click edit on the category and specify a new color for the category badge…

---

<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: [08.Январь.2015 23:58:45 UTC](https://meta.discourse.org/t/inline-category-badge-styles-change-to-stylesheet/23787/3 "2015-01-08T23:58:45Z")

</div>

I agree its not a bug, but it does make customizing category badges a bit more tricky.

Longer term I am happy to clean up the extensibility method here, you can probably just override the function in a plugin / site extension.

---

<div class="post-metadata">

### Author: ![strager](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@strager](https://meta.discourse.org/u/strager)
#### Post date: [09.Январь.2015 00:21:47 UTC](https://meta.discourse.org/t/inline-category-badge-styles-change-to-stylesheet/23787/4 "2015-01-09T00:21:47Z")

</div>

We found a way to override it using !important, but it’s a bit of a hack…

You also cant can’t the color directly on /category (for “all categories”) since there is no Edit option there.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [09.Январь.2015 00:23:04 UTC](https://meta.discourse.org/t/inline-category-badge-styles-change-to-stylesheet/23787/5 "2015-01-09T00:23:04Z")

</div>

Actually you can, you simply have to use

```plaintext
.category-dropdown-menu div.cat:first { background-color: #FF0000; } /* may still need !important */

```

---

<div class="post-metadata">

### Author: ![Bill\_S](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@Bill\_S](https://meta.discourse.org/u/Bill_S)
#### Post date: [09.Январь.2015 17:36:53 UTC](https://meta.discourse.org/t/inline-category-badge-styles-change-to-stylesheet/23787/6 "2015-01-09T17:36:53Z")

</div>

Thanks guys, we got it.

---

<div class="post-metadata">

### Author: ![Francois\_Eric\_King](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@Francois\_Eric\_King](https://meta.discourse.org/u/Francois_Eric_King)
#### Post date: [18.Май.2016 10:48:10 UTC](https://meta.discourse.org/t/inline-category-badge-styles-change-to-stylesheet/23787/7 "2016-05-18T10:48:10Z")

</div>

To change them click edit on the category and specify a new color for the category badge…but iam not able to change it.

badge color in edit category popup page is not clickable or editable. Any clue?

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [18.Май.2016 11:19:07 UTC](https://meta.discourse.org/t/inline-category-badge-styles-change-to-stylesheet/23787/8 "2016-05-18T11:19:07Z")

</div>

Can you provide a screenshot?

---

<div class="post-metadata">

### Author: ![Thomas\_Emmpunkt](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thomas_emmpunkt/32/71207_2.png) [@Thomas\_Emmpunkt](https://meta.discourse.org/u/Thomas_Emmpunkt)
#### Post date: [24.Апрель.2017 14:27:21 UTC](https://meta.discourse.org/t/inline-category-badge-styles-change-to-stylesheet/23787/9 "2017-04-24T14:27:21Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/5/2/520ed2cd4866593e7209355e6c5b323afb9d2467.jpg)

---

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [24.Апрель.2017 18:34:32 UTC](https://meta.discourse.org/t/inline-category-badge-styles-change-to-stylesheet/23787/10 "2017-04-24T18:34:32Z")

</div>

if you click on a colour in the background color section below it - it should change?

---

<div class="post-metadata">

### Author: ![Thomas\_Emmpunkt](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thomas_emmpunkt/32/71207_2.png) [@Thomas\_Emmpunkt](https://meta.discourse.org/u/Thomas_Emmpunkt)
#### Post date: [25.Апрель.2017 08:37:15 UTC](https://meta.discourse.org/t/inline-category-badge-styles-change-to-stylesheet/23787/11 "2017-04-25T08:37:15Z")

</div>

> [@mikechristopher](#):
>
> our in the background color

Yes, indeed! It changes. Even if it takes a few seconds until the “Badge color” field changes it’s color so that I as the user do notice, that I hit the right button.

Maybe “Background color” is a false leading wording. But thanks for the (more than logic) hint!

---

<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: [04.Декабрь.2025 11:33:27 UTC](https://meta.discourse.org/t/inline-category-badge-styles-change-to-stylesheet/23787/12 "2025-12-04T11:33:27Z")

</div>


