# 主题组件不再覆盖主题 CSS 了吗？

**URL:** <https://meta.discourse.org/t/theme-components-are-not-overriding-theme-css-any-more/358989>\
**Category:** Development\
**Created:** [2025年三月26日 16:45 UTC](https://meta.discourse.org/t/theme-components-are-not-overriding-theme-css-any-more/358989 "2025-03-26T16:45:48Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2025年三月26日 16:45 UTC](https://meta.discourse.org/t/theme-components-are-not-overriding-theme-css-any-more/358989/1 "2025-03-26T16:45:48Z")

</div>

~~不知为何，Discourse 处理主题组件中 CSS 的行为发生了变化。~~ 编辑：我误解了自己的操作。我将保留此主题（位于 #Development 而非 #Contribute > Bug），以供日后参考。

一个极简示例：

在 Discourse 3.4.2 版本以及今早测试通过的版本中（但昨天在 3.4.1 版本上也出现过此问题）

## 主主题 #1：导航容器周围有红色边框

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/f/c/cfccbe37b023a7ae6b36a6fc918908c56ed6138d.png)

## 主题组件 #2：导航容器周围有蓝色边框

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/1/0/810f5f7638831565731f18335a60591ac69badac.png)

主题组件 #2 已分配给主题 #1

 ![image](https://global.discourse-cdn.com/meta/original/4X/a/c/4/ac462b9fcf2178ec6a7e1bd8ee1254c2085c4eb0.png)

## 预期结果

导航容器周围有蓝色边框

## 实际情况

导航容器周围有红色边框

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/9/b/f9b2763d90550807c1655ab7c78ff3f1212cbf40.png)

---

_[View the full topic](https://meta.discourse.org/t/theme-components-are-not-overriding-theme-css-any-more/358989)._
