# 如何使搜索横幅文本使用主色而不是次色？

**URL:** <https://meta.discourse.org/t/how-to-make-the-search-banner-text-use-primary-instead-of-sceondary-color/273645>\
**Category:** Development\
**Tags:** search-banner\
**Created:** [2022年一月31日 17:24 UTC](https://meta.discourse.org/t/how-to-make-the-search-banner-text-use-primary-instead-of-sceondary-color/273645 "2022-01-31T17:24:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nerd\_Alert](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nerd_alert/32/237766_2.png) [@Nerd\_Alert](https://meta.discourse.org/u/Nerd_Alert)\
**Post date:** [2022年一月31日 17:24 UTC](https://meta.discourse.org/t/how-to-make-the-search-banner-text-use-primary-instead-of-sceondary-color/273645/1 "2022-01-31T17:24:32Z")

</div>

我怎样才能让文本使用我的主色而不是我的次色？我查看了 common.scss 文件，但没有找到任何与文本/文本颜色相关的内容。（我指的是您可以选择的文本，不确定它叫什么）

更新：

```plaintext
html .custom-search-banner-wrap h1 {
    color: var(--primary) !important;
}

html .custom-search-banner-wrap p {
    color: var(--primary) !important;
}

```

实现了这个功能，文本使用了主色而不是次色。

---

<div class="post-metadata">

**Author:** ![lindsey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lindsey/32/318210_2.png) [@lindsey](https://meta.discourse.org/u/lindsey)\
**Post date:** [2025年十二月22日 14:31 UTC](https://meta.discourse.org/t/how-to-make-the-search-banner-text-use-primary-instead-of-sceondary-color/273645/2 "2025-12-22T14:31:09Z")

</div>

根据 [Deprecating the Search Banner theme component](https://meta.discourse.org/t/deprecating-the-search-banner-theme-component/379322/) 关闭。
