# 分类徽章在引用中对齐错误且颜色丢失

**URL:** <https://meta.discourse.org/t/category-and-tag-badges-are-misaligned-and-lose-their-colour-in-quotes/372897>\
**Category:** UX\
**Created:** [2025年七月4日 08:16 UTC](https://meta.discourse.org/t/category-and-tag-badges-are-misaligned-and-lose-their-colour-in-quotes/372897 "2025-07-04T08:16:03Z")\
**Posts on this page:** 6\
**Page:** 1

<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:** [2025年七月4日 08:16 UTC](https://meta.discourse.org/t/category-and-tag-badges-are-misaligned-and-lose-their-colour-in-quotes/372897/1 "2025-07-04T08:16:03Z")

</div>

标题说明了一切。 🙂

但这里有一张截图可以提供一些额外的视觉效果：

 ![一个消息应用程序的截图，显示了关于可能将讨论移出“Bug”类别以及寻求决策背后理由的对话。(由 AI 标注)](https://global.discourse-cdn.com/meta/original/4X/e/a/e/eae1ff5628a2f5827ec3399ece0b972125eafb6e.jpeg)

> [@Should a deactivated user receive an email?](https://meta.discourse.org/t/should-a-deactivated-user-receive-an-email/365506/21?u=jammydodger):
>
> Was this confirmed as intentional? If so, I think this can likely be moved out of #Bug. (Also a little curious as to the rationale if someone is willing to share slight_smile) If it is intentional then there seems to be at least two #UX/#Feature issues here: Smoothing out the ux of this ‘dead end’ re-verify situation a user can find themselves in Providing a way to periodically force an email revalidation where the users can’t simply switch to a non-authorised email and carry on accessing…

---

<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:** [2025年七月5日 10:04 UTC](https://meta.discourse.org/t/category-and-tag-badges-are-misaligned-and-lose-their-colour-in-quotes/372897/3 "2025-07-05T10:04:01Z")

</div>

在编辑历史中也发现了这个：

 ![AI 标注的截图显示了 'meta.discourse.org' 上关于删除数千条私人消息和批量删除旧帖功能的一个讨论主题。](https://global.discourse-cdn.com/meta/original/4X/6/7/8/678dacc1379373302d35e5a874cb2a46d35c21cc.jpeg)

> [@Purge/clean/delete deleted topics from database](https://meta.discourse.org/t/purge-clean-delete-deleted-topics-from-database/300881/4?u=jammydodger):
>
> Unfortunately there isn’t currently any automatic cleanup of soft-deleted posts, and no manual bulk option in the UI either. The rails console is still the way to approach this if you need to do it. There are a few topics with some info in about how others have approached it. I think this one may be a good example to get both topics and posts (though will need a tweak to tailor it for your own use case) [How to delete thousands of Personal Messages? - #7 by RGJ](https://meta.discourse.org/t/how-to-delete-thousands-of-private-messages/162747/7). And remember to take a backup be…

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2025年七月16日 14:38 UTC](https://meta.discourse.org/t/category-and-tag-badges-are-misaligned-and-lose-their-colour-in-quotes/372897/7 "2025-07-16T14:38:24Z")

</div>

这也影响标签：

 ![Screenshot_20250716_163809_Firefox](https://global.discourse-cdn.com/meta/original/4X/2/e/1/2e1a0b01df2b90b75f783293f5966b9d0b92b54b.jpeg)

> [@How plugins moving to core is communicated](https://meta.discourse.org/t/how-plugins-moving-to-core-is-communicated/374493/12?u=moin):
>
> Yeah, it’s just a way to group those ones together and indicate that they’re the ‘bundled’ plugins. And it also serves as a marker for anyone who has the tag as Watching First Post so they get a heads up about any new ones. So adding the tag, updating the install blurb, and leaving a fresh post to the plugin topic to say ‘good news everyone partying_face this is now bundled and doesn’t need to be installed separately, yada yada, remove from app.yml’ is usually the meta portion of things. (Ma…

---

<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:** [2025年七月17日 15:34 UTC](https://meta.discourse.org/t/category-and-tag-badges-are-misaligned-and-lose-their-colour-in-quotes/372897/8 "2025-07-17T15:34:55Z")

</div>

我认为这不是设计问题，因为“正常”渲染具有不同的类，包括提供颜色的类：

 ![CleanShot 2025-07-17 at 17.33.05](https://global.discourse-cdn.com/meta/original/4X/f/1/1/f11bbea0b7d3ad3f257403b0ee8af3d51d5b2a84.png)

而引用中的则没有，而是父级上有一些占位符类：

 ![CleanShot 2025-07-17 at 17.32.36](https://global.discourse-cdn.com/meta/original/4X/5/f/5/5f5de970cf374c016bc9f550cf4df4a3d27fa086.png)

 ![CleanShot 2025-07-17 at 17.33.43](https://global.discourse-cdn.com/meta/original/4X/2/f/f/2ff4c751fbb565713728ffd0b5aaf9e57d74d299.png)

所以我认为这是个烹饪问题。@martin 你觉得呢？

---

<div class="post-metadata">

**Author:** ![saquetim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saquetim/32/116400_2.png) [@saquetim](https://meta.discourse.org/u/saquetim)\
**Post date:** [2025年七月22日 00:16 UTC](https://meta.discourse.org/t/category-and-tag-badges-are-misaligned-and-lose-their-colour-in-quotes/372897/12 "2025-07-22T00:16:53Z")

</div>

下面的 PR 将解决此问题。

> <https://github.com/discourse/discourse/pull/33740>
>
> This PR refactors the \`PostCookedHtml\` and \`PostQuotedContent\` components to enh…ance how quoted posts are rendered and decorated. It introduces a new \`className\` prop for customizing the class of cooked HTML, and ensures collapsed quote content is consistently decorated with appropriate styles and structure.
> 
> Key changes:
> \- Adds a \`className\` argument to \`PostCookedHtml\`, allowing quoted content to have a distinct class for easier styling.
> \- Updates \`PostQuotedContent\` to render collapsed and expanded quoted content through \`PostCookedHtml\`, ensuring consistent decoration and disabling selection barriers for quoted posts.
> \- Refines decorator application logic in \`PostCookedHtml\` to conditionally apply selection barriers.
> \- Improves CSS by targeting quoted content within blockquotes, ensuring top and bottom margins are correctly removed from child elements.
> \- Updates acceptance tests to support both classic and glimmer post stream modes, verifying composer actions and quoted content behavior across modes.

---

<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:** [2025年七月22日 10:55 UTC](https://meta.discourse.org/t/category-and-tag-badges-are-misaligned-and-lose-their-colour-in-quotes/372897/13 "2025-07-22T10:55:09Z")

</div>

对于分类和标签（用引号括起来）来说，看起来都不错。🎉

在编辑历史记录中仍然有点不完美，但那些地方已经不那么显眼了。
