# 切换到单一类别风格的站点设置

**URL:** <https://meta.discourse.org/t/moving-to-a-single-category-style-site-setting/282441>\
**Category:** Announcements\
**Created:** [2023年十月16日 20:53 UTC](https://meta.discourse.org/t/moving-to-a-single-category-style-site-setting/282441 "2023-10-16T20:53:56Z")\
**Posts on this page:** 9\
**Page:** 3

<div class="post-metadata">

**Author:** ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)\
**Post date:** [2024年一月23日 15:15 UTC](https://meta.discourse.org/t/moving-to-a-single-category-style-site-setting/282441/45 "2024-01-23T15:15:10Z")

</div>

@awesomerobot 我注意到它也发生在 PM 收件人框中：

 ![CleanShot 2024-01-23 at 16.14.24](https://global.discourse-cdn.com/meta/original/4X/7/0/e/70eadd6ce2b9189e8b3ac77c94db999fda7bdb70.png)

---

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [2024年一月25日 20:37 UTC](https://meta.discourse.org/t/moving-to-a-single-category-style-site-setting/282441/46 "2024-01-25T20:37:39Z")

</div>

这仍然是这种情况吗？我在全新安装中没有看到这个……也许是另一个主题在干扰？

![Screenshot 2024-01-25 at 3.36.52 PM](https://global.discourse-cdn.com/meta/original/4X/7/f/f/7ff40b7e49b799152ecb070f6b11c071d676a66e.png)

 ![Screenshot 2024-01-25 at 3.37.28 PM](https://global.discourse-cdn.com/meta/original/4X/b/b/5/bb5566ff2a1f51cbcd5035a298c20fdd355e6a62.png)

> [@Nacho\_Caballero](#):
>
> 我不知道这是否是由于最新的更改，但在具有子类别的类别中，“全部”和“无”现在缺少左填充：
> 
> ![CleanShot 2024-01-06 at 08.20.22@2x](https://global.discourse-cdn.com/meta/original/4X/9/2/3/923f2729a53089d63489d5db68c5fb936740f860.png)

> [@Nacho\_Caballero](#):
>
> 我注意到在 PM 收件人框中也发生了这种情况：
> 
> ![CleanShot 2024-01-23 at 16.14.24](https://global.discourse-cdn.com/meta/original/4X/7/0/e/70eadd6ce2b9189e8b3ac77c94db999fda7bdb70.png)

---

<div class="post-metadata">

**Author:** ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)\
**Post date:** [2024年一月26日 08:11 UTC](https://meta.discourse.org/t/moving-to-a-single-category-style-site-setting/282441/47 "2024-01-26T08:11:54Z")

</div>

你说得对！我之前添加了自定义 CSS，导致了这个变化。删除它之后问题就解决了。

我还注意到徽章的高度会随着窗口大小的变化而变化。这是我调整浏览器窗口大小时录制的 GIF：  
 ![CleanShot 2024-01-26 at 09.07.57](https://global.discourse-cdn.com/meta/original/4X/7/c/4/7c4d2ea98c5f1ea9ffaa8b2c6210ed863884a629.gif)

这可能与之相关：

> [@Nacho\_Caballero](#):
>
> 我注意到字体大小/垂直内边距在不同情况下不一致（首页、编辑现有主题、仅编辑标题、更改当前类别、滚动浏览现有类别列表）。

---

<div class="post-metadata">

**Author:** ![znedw](https://avatars.discourse-cdn.com/v4/letter/z/b5e925/32.png) [@znedw](https://meta.discourse.org/u/znedw)\
**Post date:** [2025年三月27日 22:47 UTC](https://meta.discourse.org/t/moving-to-a-single-category-style-site-setting/282441/48 "2025-03-27T22:47:48Z")

</div>

主题组件在 [6f92f42eb8](https://github.com/discourse/discourse/commits/6f92f42eb83fea61b2712aaaefcc124e4939365d) 中已损坏  
我在组件设置中选择 `bar` 时，得到 `--style-square`

我猜这与  
[FEATURE: add icons and emojis to category (#31795) · discourse/discourse@d06c60c · GitHub](https://github.com/discourse/discourse/commit/d06c60ca7c5081c8080338645910cd7f17504d2e) 有关

---

<div class="post-metadata">

**Author:** ![davidb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidb/32/554671_2.png) [@davidb](https://meta.discourse.org/u/davidb)\
**Post date:** [2025年四月11日 07:49 UTC](https://meta.discourse.org/t/moving-to-a-single-category-style-site-setting/282441/51 "2025-04-11T07:49:24Z")

</div>

您好 Zach，感谢您的报告。

您能多告诉我一些关于哪里出问题了吗？您提供的任何详细信息都将有助于主题组件的修复。

---

<div class="post-metadata">

**Author:** ![znedw](https://avatars.discourse-cdn.com/v4/letter/z/b5e925/32.png) [@znedw](https://meta.discourse.org/u/znedw)\
**Post date:** [2025年四月11日 08:04 UTC](https://meta.discourse.org/t/moving-to-a-single-category-style-site-setting/282441/52 "2025-04-11T08:04:33Z")

</div>

![Screenshot_20250411-180126~2](https://global.discourse-cdn.com/meta/original/4X/5/9/4/5947addf475201e7d09b044d5452fa249a9e9ede.png)  
 ![Screenshot_20250411-180052~2](https://global.discourse-cdn.com/meta/original/4X/3/a/6/3a6fc93fc7bcf9026755937ce50d115d686d67ce.jpeg)  
站点设置是条形图，但我看到的是方形图

---

<div class="post-metadata">

**Author:** ![davidb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidb/32/554671_2.png) [@davidb](https://meta.discourse.org/u/davidb)\
**Post date:** [2025年四月11日 08:05 UTC](https://meta.discourse.org/t/moving-to-a-single-category-style-site-setting/282441/53 "2025-04-11T08:05:54Z")

</div>

谢谢你，我已经安装了这个组件，能够看到问题的原因。

当修复可用时，我会在这里分享更新。

---

<div class="post-metadata">

**Author:** ![davidb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidb/32/554671_2.png) [@davidb](https://meta.discourse.org/u/davidb)\
**Post date:** [2025年四月12日 06:58 UTC](https://meta.discourse.org/t/moving-to-a-single-category-style-site-setting/282441/54 "2025-04-12T06:58:35Z")

</div>

此提交应能修复主题组件中的问题：

> <https://github.com/discourse/discourse-category-badge-styles/commit/790adaae99db9101edde6dd66253710edccbbdad>
>
> Some styling fixes to allow the theme component to work better since introducing… category icons/emojis in core.

---

<div class="post-metadata">

**Author:** ![znedw](https://avatars.discourse-cdn.com/v4/letter/z/b5e925/32.png) [@znedw](https://meta.discourse.org/u/znedw)\
**Post date:** [2025年四月13日 00:43 UTC](https://meta.discourse.org/t/moving-to-a-single-category-style-site-setting/282441/55 "2025-04-13T00:43:34Z")

</div>

已修复，非常感谢！

[上一頁](https://meta.discourse.org/t/moving-to-a-single-category-style-site-setting/282441.md?page=2)
