# 在类别名称中包含表情符号

**URL:** https://meta.discourse.org/t/include-emojis-in-category-names/76892
**Category:** Support
**Created:** [2017年十二月28日 18:46 UTC](https://meta.discourse.org/t/include-emojis-in-category-names/76892 "2017-12-28T18:46:22Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Tyson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tyson/32/86155_2.png) [@Tyson](https://meta.discourse.org/u/Tyson)
#### Post date: [2017年十二月28日 18:46 UTC](https://meta.discourse.org/t/include-emojis-in-category-names/76892/1 "2017-12-28T18:46:22Z")

</div>

Is it possible to display emojis in Category names like this?:

> 📢 Announcements

> 🖥 Tech Support

---

<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: [2017年十二月28日 22:08 UTC](https://meta.discourse.org/t/include-emojis-in-category-names/76892/2 "2017-12-28T22:08:16Z")

</div>

You could probably do some fancy CSS customization to achieve something similar.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [2017年十二月29日 14:32 UTC](https://meta.discourse.org/t/include-emojis-in-category-names/76892/3 "2017-12-29T14:32:17Z")

</div>

Probably not inside the drop-downs as the list items are not styled with classes that can distinguish different categories. Nor in category lists.

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [2017年十二月29日 16:33 UTC](https://meta.discourse.org/t/include-emojis-in-category-names/76892/4 "2017-12-29T16:33:55Z")

</div>

One way to do this is to use the category’s url as a guideline.

Here’s a very rough example:

```plaintext
[href="/c/hosting"] .badge-category-bg { // remove default category color marker
    display: none !important;
}

[href="/c/hosting"] .badge-category:before { // add new font awesome icon in its place
    font-family: fontawesome;
    content: "\f1b9";
    margin-right: 5px;
}

```

This would result in:

 ![add icon to category](https://global.discourse-cdn.com/meta/original/3X/a/9/a9874a6d8c608de572991bf4f9ed092fb14fa826.PNG)

I have not tested this everywhere and it **needs a lot more refinement** but that’s the basic idea.

The composer selecter has attributes added to category list items like `data-name="hosting"`

---

<div class="post-metadata">

### Author: ![Tyson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tyson/32/86155_2.png) [@Tyson](https://meta.discourse.org/u/Tyson)
#### Post date: [2017年十二月29日 20:18 UTC](https://meta.discourse.org/t/include-emojis-in-category-names/76892/5 "2017-12-29T20:18:32Z")

</div>

This is cool. Probably the closest I can get for now. Thank you!

---

<div class="post-metadata">

### Author: ![anderer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anderer/32/310458_2.png) [@anderer](https://meta.discourse.org/u/anderer)
#### Post date: [2023年六月22日 08:32 UTC](https://meta.discourse.org/t/include-emojis-in-category-names/76892/6 "2023-06-22T08:32:01Z")

</div>

我一直在找这个——因为 MD-短代码在类别名称字段中不起作用——所以我尝试将一个红心 ❤ 复制粘贴到类别名称中，并发现 discourse 会欣然接受它，就像它可能会接受 🪐 土星一样。

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2024年六月8日 12:36 UTC](https://meta.discourse.org/t/include-emojis-in-category-names/76892/7 "2024-06-08T12:36:42Z")

</div>

此主题已在 2353 天后自动关闭。不再允许回复。
