After updating to Discourse 3.1.0.beta4, users noticed that category box border colors were broken, with CSS incorrectly injecting both color and variable values sok777. Initial speculation pointed to theme components like “Colorful Categories” JammyDodger, but sok777 confirmed the issue persisted across multiple themes and without the component. MarcP clarified the issue was core-related, not plugin-dependent. awesomerobot confirmed it was a Discourse regression unrelated to themes/plugins and that a fix had been merged (https://github.com/discourse/discourse/commit/e43ac00bf40d1da662ffbe61cd96b50b1696d21e), restoring colors after updating. Meanwhile, sok777 shared a JavaScript workaround to manually apply category color variables using data-category-id. Users also learned they could update from the UI via /admin/upgradeawesomerobot. MarcP later noted the issue still persisted on mobile, despite being fixed on desktop.
Hi- couldn’t find anyone else reporting this, but I checked with multiple themes and the categories box border-color inline CSS seems to be broken after updating to 3.1.0.beta4.
This is why:
Not sure why it’s injecting both the color and the var (?)
Thanks! No, I’ve tried using Material theme, but also several others just in case. Unfortunately the behavior was the same. Happened right after the update. Everything else seems okay though so far.
Good points. Now that I think about it borders need to have a border color in core. It’s not related to the component since even with the component disables the borders are all grey.
So as long as you know the category’s ID, you can access its color in CSS. The easiest way to find the ID (number) is to look at the category URL, Support for example: https://meta.discourse.org/c/support/6 — to use the support category’s color you can do something like this:
That’s awesome. Though I guess for this issue the only way to solve it would be to check the id of the category, then apply the correct CSS var using JS.
Unless you have another workaround in mind? Happy to try code this and share here