# Issue with font colour in category badges

**URL:** https://meta.discourse.org/t/issue-with-font-colour-in-category-badges/401679
**Category:** UX
**Tags:** category-badge-styles, fixed
**Created:** [April 28, 2026, 8:09am UTC](https://meta.discourse.org/t/issue-with-font-colour-in-category-badges/401679 "2026-04-28T08:09:05Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![RFL](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@RFL](https://meta.discourse.org/u/RFL)
#### Post date: [April 28, 2026, 8:09am UTC](https://meta.discourse.org/t/issue-with-font-colour-in-category-badges/401679/1 "2026-04-28T08:09:05Z")

</div>

Hello all,

Hoping someone might have a solution for this problem that has only started happening since last night when we updated Discourse to 2026.4.0-latest (e4ab7a2cc9)

We use white font for all of our category badges and they display correctly when you’re at the top of a topic

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/f/8/5f81215e5898abd9be08c85972a87bf9666d2d59.png)

However once you start scrolling down the topic, the font colour in the category automatically changes

![image](https://global.discourse-cdn.com/meta/original/4X/7/c/c/7ccbf654e0d8b3e8e5415ce7b66339660d642770.png)

I’ve looked through the theme settings and there’s nothing I can see that it causing this to happen.

---

<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: [April 28, 2026, 8:17am UTC](https://meta.discourse.org/t/issue-with-font-colour-in-category-badges/401679/2 "2026-04-28T08:17:26Z")

</div>

Hello @RFL

First thing to do is always test in safe-mode.

Second tip is to mention what theme you are using. I think the issue will be specific to that theme, since the screenshot isn’t showing the default tag look.

Third tip is to check via the inspector what is happening and post a screenshot of it here.

---

<div class="post-metadata">

### Author: ![RFL](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@RFL](https://meta.discourse.org/u/RFL)
#### Post date: [April 28, 2026, 9:13am UTC](https://meta.discourse.org/t/issue-with-font-colour-in-category-badges/401679/3 "2026-04-28T09:13:06Z")

</div>

Hi chapoi,

Thank you for the prompt and helpful reply.

I did the safe-mode test (one option at a time) and the disabling the following made no difference

- unofficial client-side plugin customizations
- all client-side plugin customizations

We’re using the Category Badge Styles component with ‘box’ as the selected style

So disabling themes and theme components did get rid of the problem, as it changed the category badge back to the default appearance

![image](https://global.discourse-cdn.com/meta/original/4X/0/6/2/062570241913c823d4ab19ebfe0cde14cba71c30.png)

We’re using the light mode theme with the following colour palette

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/3/4/634fbb9e505aaa2897ccb77512cfd49e93417a74.png)

Our custom CSS is

```plaintext
/* table */

.cooked table thead, .d-editor-preview table thead {
    border-top: 1px solid #ddd !important;
    border-bottom: 1px solid #ddd !important;
    background-color: #ddd;
}

.cooked table tr, .d-editor-preview table tr {
    border-bottom: 1px solid #ddd;
}

.cooked table td, .cooked table th, .d-editor-preview table td, .d-editor-preview table th {
    border-right: 1px solid #ddd;
    border-left: 1px solid #ddd;
}

.fa-heart:before {
    content: "\f164";
}

.category-name {
    font-weight: bold;
    text-transform: uppercase;
    padding: 1px;
}

```

Using the inspector, this seems to be causing the problem, because when I untick the top line, the font colour then reverts to the correct colour (white).

Any idea on how I would fix this?

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/0/0/c00d3b9a8bd1cb8b27807c65b70a752f11197ec9.png)

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [April 28, 2026, 9:44am UTC](https://meta.discourse.org/t/issue-with-font-colour-in-category-badges/401679/5 "2026-04-28T09:44:40Z")

</div>

if your forum is just using the one theme and color palette, then you can add this in your custom css:

```scss
.badge-category __wrapper .badge-category__ name {
  color: var(--secondary);
}

```

---

<div class="post-metadata">

### Author: ![RFL](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@RFL](https://meta.discourse.org/u/RFL)
#### Post date: [April 28, 2026, 10:07am UTC](https://meta.discourse.org/t/issue-with-font-colour-in-category-badges/401679/6 "2026-04-28T10:07:31Z")

</div>

Thank you Lilly. That works and seems to be the quickest way to fix the problem.

---

<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: [April 28, 2026, 10:46am UTC](https://meta.discourse.org/t/issue-with-font-colour-in-category-badges/401679/7 "2026-04-28T10:46:22Z")

</div>

We’ll investigate where the issue is originating, and update here

---

<div class="post-metadata">

### Author: ![derek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/derek/32/458751_2.png) [@derek](https://meta.discourse.org/u/derek)
#### Post date: [May 1, 2026, 9:59pm UTC](https://meta.discourse.org/t/issue-with-font-colour-in-category-badges/401679/8 "2026-05-01T21:59:19Z")

</div>

Looks like some styles from our foundation modernization are overriding the text color here.

 ![Screenshot 2026-05-01 at 2.29.31 PM](https://global.discourse-cdn.com/meta/original/4X/4/7/3/47321cdba7aa2ba330576be19ec7ac685caf2b05.png)  
 ![Screenshot 2026-05-01 at 2.29.18 PM](https://global.discourse-cdn.com/meta/original/4X/c/d/a/cda5130931b565833e1600f77f1c607928418cce.png)

I’ve got a PR here that should properly set the expected color on the Category badge theme component. Once it’s merged you can give it a go.

[https://github.com/discourse/discourse-category-badge-styles/pull/34](https://github.com/discourse/discourse-category-badge-styles/pull/34)

---

<div class="post-metadata">

### Author: ![RFL](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@RFL](https://meta.discourse.org/u/RFL)
#### Post date: [May 2, 2026, 6:20am UTC](https://meta.discourse.org/t/issue-with-font-colour-in-category-badges/401679/9 "2026-05-02T06:20:36Z")

</div>

Thanks Derek, much appreciated.

---

<div class="post-metadata">

### Author: ![derek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/derek/32/458751_2.png) [@derek](https://meta.discourse.org/u/derek)
#### Post date: [May 4, 2026, 1:46pm UTC](https://meta.discourse.org/t/issue-with-font-colour-in-category-badges/401679/10 "2026-05-04T13:46:51Z")

</div>

It’s merged now! Let me know if you run into anymore issues.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 7, 2026, 1:47pm UTC](https://meta.discourse.org/t/issue-with-font-colour-in-category-badges/401679/12 "2026-05-07T13:47:23Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
