# 有没有办法更改小图标出现的宽度？

**URL:** <https://meta.discourse.org/t/any-way-to-change-at-what-width-the-small-logo-appears/408767>\
**Category:** Development\
**Created:** [2026年七月28日 21:05 UTC](https://meta.discourse.org/t/any-way-to-change-at-what-width-the-small-logo-appears/408767 "2026-07-28T21:05:55Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![sb56637](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sb56637](https://meta.discourse.org/u/sb56637)\
**Post date:** [2026年七月29日 13:52 UTC](https://meta.discourse.org/t/any-way-to-change-at-what-width-the-small-logo-appears/408767/5 "2026-07-29T13:52:41Z")

</div>

哦，你说得对……

> <https://github.com/discourse/discourse-full-width-component/blob/main/javascripts/discourse/api-initializers/full-width.gjs>

```plaintext
// 当侧边栏可见时，强制 HomeLogo 处于“未最小化”状态。
  const transformerExists = api.registerValueTransformer?.(
    "home-logo-minimized",
    ({ value, context }) => {
      if (value && context.showSidebar) {
        return false;
      }
      return value;
    }
  );

```

> <https://github.com/discourse/discourse-full-width-component/blob/main/spec/system/full_width_spec.rb>

^ 还有这个，但它只是用于自动化测试，对吧？

有没有一种相对干净的方法可以“覆盖覆盖”，而不需要对组件进行完整的分叉？我主要需要它是因为 1) _许多_用户明确表示非常偏好宽布局，2) 除了仅仅增加 `--d-max-width` 和 `--topic-body-width` 值之外，还有太多主要和次要的 quirks 需要用 CSS 规则来处理。我一直在维护我自己的主题组件，其中包含我从 [discourse-full-width-component/common/common.scss at main · discourse/discourse-full-width-component · GitHub](https://github.com/discourse/discourse-full-width-component/blob/main/common/common.scss) 复制并改编的大量纯 CSS 规则，但它往往会在每个主要的 Discourse 版本中出现问题，我更喜欢像 Full Width Component 这样维护得更好、维护成本更低的解决方案。

---

_[View the full topic](https://meta.discourse.org/t/any-way-to-change-at-what-width-the-small-logo-appears/408767)._
