# 薄荷主题

**URL:** https://meta.discourse.org/t/mint-theme/202822
**Category:** Theme
**Tags:** official, mint-theme
**Created:** [2021年九月7日 12:06 UTC](https://meta.discourse.org/t/mint-theme/202822 "2021-09-07T12:06:24Z")
**Posts on this page:** 20
**Page:** 3

<div class="post-metadata">

### Author: ![wendellverli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wendellverli/32/280396_2.png) [@wendellverli](https://meta.discourse.org/u/wendellverli)
#### Post date: [2024年六月14日 12:41 UTC](https://meta.discourse.org/t/mint-theme/202822/43 "2024-06-14T12:41:47Z")

</div>

> [@Arkshine](#):
>
> ```plaintext
> .navigation-categories .search-banner {
> padding: 0;
> margin: 0;
> }
> 
> ```

这段代码不起作用。

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [2024年六月14日 12:49 UTC](https://meta.discourse.org/t/mint-theme/202822/44 "2024-06-14T12:49:54Z")

</div>

在我这边是可以正常工作的。不过，也许它缺少一个 `height: auto`。

这是我所做的。我创建了一个附加到主题的主题组件。

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

插入了 CSS：

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/7/1/9717c22993d400dc512c9a3183799466fbb91e6f.png)

然后，结果是：

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/1/1/511974fbdf49303438ae13e812ba2124d58dd9af.png)

你可以在控制台中看到自定义 CSS：

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/5/c/05c4ce76918bc8d637e8e5538f47c459bf70d1d3.png)

你在这些步骤中遗漏了什么吗？

---

<div class="post-metadata">

### Author: ![wendellverli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wendellverli/32/280396_2.png) [@wendellverli](https://meta.discourse.org/u/wendellverli)
#### Post date: [2024年六月14日 13:12 UTC](https://meta.discourse.org/t/mint-theme/202822/45 "2024-06-14T13:12:43Z")

</div>

那简直是妙手回春！非常感谢！

---

<div class="post-metadata">

### Author: ![wendellverli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wendellverli/32/280396_2.png) [@wendellverli](https://meta.discourse.org/u/wendellverli)
#### Post date: [2024年六月14日 13:16 UTC](https://meta.discourse.org/t/mint-theme/202822/46 "2024-06-14T13:16:13Z")

</div>

它奏效了——自定义 CSS 是否在整个页眉等处都有效？或者我需要针对该内容进行特定设置？

---

<div class="post-metadata">

### Author: ![wendellverli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wendellverli/32/280396_2.png) [@wendellverli](https://meta.discourse.org/u/wendellverli)
#### Post date: [2024年六月14日 14:28 UTC](https://meta.discourse.org/t/mint-theme/202822/47 "2024-06-14T14:28:54Z")

</div>

![Screenshot 2024-06-14 at 9.26.39 AM](https://global.discourse-cdn.com/meta/original/4X/2/7/a/27a30365017a7c805967680c0bcc7306322964a7.jpeg)

这个框的颜色是从哪里来的？我能够将另一边的圆圈设置为“：none；”。

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [2024年六月14日 14:48 UTC](https://meta.discourse.org/t/mint-theme/202822/48 "2024-06-14T14:48:21Z")

</div>

这是相关的 CSS：

> <https://github.com/discourse/discourse-mint-theme/blob/main/desktop/desktop.scss#L19-L46>

我认为你可以这样做：

```css
#main-outlet:before{
  background: none;
}

```

---

<div class="post-metadata">

### Author: ![wendellverli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wendellverli/32/280396_2.png) [@wendellverli](https://meta.discourse.org/u/wendellverli)
#### Post date: [2024年六月14日 14:51 UTC](https://meta.discourse.org/t/mint-theme/202822/49 "2024-06-14T14:51:10Z")

</div>

太棒了！谢谢！

---

<div class="post-metadata">

### Author: ![Liam\_Layton](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/liam_layton/32/431581_2.png) [@Liam\_Layton](https://meta.discourse.org/u/Liam_Layton)
#### Post date: [2024年七月14日 15:58 UTC](https://meta.discourse.org/t/mint-theme/202822/50 "2024-07-14T15:58:30Z")

</div>

您好，我非常喜欢这个主题，但原生移动视图看起来很糟糕。如果我在手机上手动切换到桌面视图，它能完美地自动调整大小以适应设备。我对 discourse 相当陌生，不确定这个移动视图是否是标准配置。我能编辑什么来让主题在手机上看起来不错吗？谢谢。

---

<div class="post-metadata">

### Author: ![MustardMan](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@MustardMan](https://meta.discourse.org/u/MustardMan)
#### Post date: [2024年七月18日 15:06 UTC](https://meta.discourse.org/t/mint-theme/202822/51 "2024-07-18T15:06:53Z")

</div>

是否可以在搜索横幅中更改文本颜色？

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [2024年七月18日 15:25 UTC](https://meta.discourse.org/t/mint-theme/202822/52 "2024-07-18T15:25:36Z")

</div>

当然，  
您可以创建一个新的主题组件，将其附加到您的主题，并添加以下 CSS：

```css
.custom-search-banner-wrap {
    h1 {
        color: blue; /* headline*/

        &+p {
            color: red; /* subhead */
        }
    }

    .search-menu {
        .btn.search-icon.has-search-button-text {
            .d-icon {
                color: orange; /* search button icon */
            }

            .d-button-label {
                color: orange; /* search button text */
            }
        }
    }
}

```

这有帮助吗？

---

<div class="post-metadata">

### Author: ![ishua\_wang](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ishua_wang/32/477584_2.png) [@ishua\_wang](https://meta.discourse.org/u/ishua_wang)
#### Post date: [2025年一月2日 00:48 UTC](https://meta.discourse.org/t/mint-theme/202822/53 "2025-01-02T00:48:57Z")

</div>

主题非常好。感谢您的努力。Discourse 会进行更新，并且有一个已弃用的 API：get\_owner，可以修复此问题吗？

---

<div class="post-metadata">

### Author: ![Aurora](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aurora/32/523140_2.png) [@Aurora](https://meta.discourse.org/u/Aurora)
#### Post date: [2025年二月9日 09:58 UTC](https://meta.discourse.org/t/mint-theme/202822/54 "2025-02-09T09:58:02Z")

</div>

我也希望在此视图中看到谁创建了该主题。可惜的是，大多数主题都无法实现这一点。

例如，使用 Facebook Pro 主题就可以做到。

我该如何才能在 Mint 主题或经典主题中看到它？

 ![该图片显示了 Discord 反馈频道的一个屏幕截图，其中包含几位用户关于 Mint 主题的帖子，包括一个“注册时全名丢失”的错误报告和一个“主题卡在黑暗模式”的求助请求。(由人工智能标注)](https://global.discourse-cdn.com/meta/original/4X/2/c/0/2c0e2b3357966b9df297b22b0d7aad84e43fd3d4.jpeg)

 ![该图片显示了移动设备上 meta.discourse.org 论坛的屏幕截图，其中突出显示了论坛活动以及一个关于“Mint 主题”的帖子（有 51 条回复）和一个关于“数字标签和过滤器”的帖子（有三条回复）。(由人工智能标注)](https://global.discourse-cdn.com/meta/original/4X/b/b/9/bb9589b0e74abcf7cb6db0a0c8fe623d1a1afbd5.jpeg)

 ![此图片显示了 Mac 上的 meta.discourse.org 论坛的屏幕截图，其中显示了多个论坛主题，包括关于主题、数字标签和插件的部分。(由人工智能标注)](https://global.discourse-cdn.com/meta/original/4X/0/b/0/0b0d093fb883269775c1f1cd46b39445fdf806ff.jpeg)

---

<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年二月9日 13:50 UTC](https://meta.discourse.org/t/mint-theme/202822/55 "2025-02-09T13:50:58Z")

</div>

有一些主题组件会在移动设备上显示首帖作者。我没有用这个主题明确测试过它们，但预计它们是兼容的

> [@Show Original Poster Avatars](https://meta.discourse.org/t/show-original-poster-avatars/171346):
>
> discourse2Summary Show Original Poster Avatars is a simple theme component that shows the profile picture of the original poster (OP) on the mobile topic list, rather than the latest reply.eyeglassesPreview [Preview on Discourse Creator](https://discourse.theme-creator.io/theme/Discourse/show-op-avatars) (mobile only)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-mobile-op-avatar-component](https://github.com/discourse/discourse-mobile-op-avatar-component)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component Featu…

> [@Show both OP and last reply on mobile](https://meta.discourse.org/t/show-both-op-and-last-reply-on-mobile/267944):
>
> information_sourceSummary This component show topic OP and last reply on mobileeyeglassesPreview [Theme Creator](https://discourse.theme-creator.io/theme/Lhc_fl/op-and-reply)hammer_and_wrenchRepository [Lhcfl/discourse-mobile-topic-op-and-last-reply (github.com)](https://github.com/Lhcfl/discourse-mobile-topic-op-and-last-reply)questionInstall Guide [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component This theme component is heavily inspired by @awesomerobot’s [Show Original Poster Avata…](https://meta.discourse.org/t/show-original-poster-avatars/171346)

> [@Topic List Author](https://meta.discourse.org/t/topic-list-author/269910):
>
> information_sourceSummary Makes the topic author appear instead of posters and allows changing the placement of the author column in topic list pages.hammer_and_wrenchRepository [https://github.com/discourse/discourse-topic-list-author](https://github.com/discourse/discourse-topic-list-author)eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/topic-list-author)questionInstall Guide [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component …

---

<div class="post-metadata">

### Author: ![Aurora](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aurora/32/523140_2.png) [@Aurora](https://meta.discourse.org/u/Aurora)
#### Post date: [2025年二月9日 22:02 UTC](https://meta.discourse.org/t/mint-theme/202822/56 "2025-02-09T22:02:44Z")

</div>

谢谢！

---

<div class="post-metadata">

### Author: ![tenisforum](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tenisforum/32/493886_2.png) [@tenisforum](https://meta.discourse.org/u/tenisforum)
#### Post date: [2025年三月14日 08:53 UTC](https://meta.discourse.org/t/mint-theme/202822/57 "2025-03-14T08:53:17Z")

</div>

你好！感谢提供主题和指南。我遇到了关于深色/浅色/自动按钮颜色的问题。按钮文本颜色和背景颜色总是相同，这使得文本不可见。你能帮忙吗？

 ![t1](https://global.discourse-cdn.com/meta/original/4X/5/6/5/565780fd0c766c98aad37a3846b2f0c96b9cbada.png)

---

<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年五月9日 19:06 UTC](https://meta.discourse.org/t/mint-theme/202822/58 "2025-05-09T19:06:30Z")

</div>

I can reproduce the issue on [try.discourse.org](http://try.discourse.org)

 ![Screenshot_20250509_210540_Firefox](https://global.discourse-cdn.com/meta/original/4X/7/e/4/7e4751cb60030d1acbd8da0d58cf115ccc327c44.jpeg)

 ![Screenshot_20250509_210507_Firefox](https://global.discourse-cdn.com/meta/original/4X/0/1/9/01941023079cf8387c7dcc8b479561f01e787ab9.jpeg)

---

<div class="post-metadata">

### Author: ![hanxiao\_Pan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hanxiao_pan/32/492161_2.png) [@hanxiao\_Pan](https://meta.discourse.org/u/hanxiao_Pan)
#### Post date: [2025年六月24日 02:46 UTC](https://meta.discourse.org/t/mint-theme/202822/59 "2025-06-24T02:46:00Z")

</div>

为什么我的主题没有显示高级搜索横幅？我确认组件已安装并启用。

---

<div class="post-metadata">

### Author: ![meghna](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meghna/32/453356_2.png) [@meghna](https://meta.discourse.org/u/meghna)
#### Post date: [2025年六月24日 03:22 UTC](https://meta.discourse.org/t/mint-theme/202822/60 "2025-06-24T03:22:23Z")

</div>

这是主题中的一个错误，我正在修复它。

---

<div class="post-metadata">

### Author: ![meghna](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meghna/32/453356_2.png) [@meghna](https://meta.discourse.org/u/meghna)
#### Post date: [2025年六月27日 04:24 UTC](https://meta.discourse.org/t/mint-theme/202822/61 "2025-06-27T04:24:44Z")

</div>

将主题更新到最新版本应该能解决该问题。

---

<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年八月4日 15:59 UTC](https://meta.discourse.org/t/mint-theme/202822/62 "2025-08-04T15:59:54Z")

</div>

已修复，请参阅

> <https://github.com/discourse/discourse/pull/34070>
>
> The dropdown has \`btn-default\` classes applied, while they aren't button default…s and thus it's causing styling issues.
> 
> Example mint theme:
> \* missing icons
> \* awkward border 
> 
> | Before | After |
> |--------|--------|
> | \<img width="253" height="210" alt="CleanShot 2025-08-04 at 17 54 28" src="https://github.com/user-attachments/assets/073b459a-e6f1-41ae-8065-77c81e6c70df" /\> | \<img width="253" height="210" alt="CleanShot 2025-08-04 at 17 55 06" src="https://github.com/user-attachments/assets/c36931a8-39e9-49c4-86aa-726a463be78c" /\> |

[上一頁](https://meta.discourse.org/t/mint-theme/202822.md?page=2)

[下一頁](https://meta.discourse.org/t/mint-theme/202822.md?page=4)
