Skip to content

A platform for community discussion. Free, open, simple.

UX: fix chat appearance of subcategories with emoji (#36579)

Kris496adfd576ac
diff --git a/frontend/discourse/app/lib/hashtag-types/category.js b/frontend/discourse/app/lib/hashtag-types/category.js
index b992a6aa4b0..b5504bd0c67 100644
--- a/frontend/discourse/app/lib/hashtag-types/category.js
+++ b/frontend/discourse/app/lib/hashtag-types/category.js
@@ -44,12 +44,14 @@ export default class CategoryHashtagType extends HashtagTypeBase {
}
let style;
- if (parentColor) {
- style = `background: linear-gradient(-90deg, #${color} 50%, #${parentColor} 50%);`;
+ if (categoryOrHashtag.style_type === "square") {
+ if (parentColor) {
+ style = `background: linear-gradient(-90deg, #${color} 50%, #${parentColor} 50%);`;
+ } else {
+ style = `background-color: #${color};`;
+ }
} else if (categoryOrHashtag.style_type === "icon") {
style = `color: #${color};`;
- } else if (categoryOrHashtag.style_type === "square") {
- style = `background-color: #${color};`;
} else {
return [];
}