# before-topic-progress outlet がなぜ \<span\\\> で囲まれているのか？

**URL:** https://meta.discourse.org/t/why-is-the-before-topic-progress-outlet-wrapped-with-a-span/394935
**Category:** Development
**Tags:** mobile
**Created:** [2026 年 2 月 2 日午後 12:56 UTC](https://meta.discourse.org/t/why-is-the-before-topic-progress-outlet-wrapped-with-a-span/394935 "2026-02-02T12:56:45Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [2026 年 2 月 2 日午後 12:56 UTC](https://meta.discourse.org/t/why-is-the-before-topic-progress-outlet-wrapped-with-a-span/394935/1 "2026-02-02T12:56:45Z")

</div>

モバイルのタイムラインコンテナにコンテンツを追加しようとしていました。

このコンテナには2つのアウトレットがあります。

[`before-topic-progress`](https://github.com/discourse/discourse/blob/efd6f516fc5f0f66713a5d5d94ccc7140b4ecb49/frontend/discourse/app/templates/topic.gjs#L376) と [`after-topic-progress`](https://github.com/discourse/discourse/blob/efd6f516fc5f0f66713a5d5d94ccc7140b4ecb49/frontend/discourse/app/components/topic-progress.gjs#L134) です。

`before-topic-progress` は `<span>` で囲まれており、その理由がわかりません。🤔

コンテナはインラインではなく、このアウトレットの周りに意図的に `span` がラップされる理由が見当たりません。これには明白な目的がなく、独自のコンテンツレイアウトを妨げます。例えば、ボタンを挿入したい場合、この `span` のせいでボタンが他の要素の高さと一致できなくなります。

![image](https://global.discourse-cdn.com/meta/original/4X/b/3/2/b3276bc7ca8d7881d727956b2dd296dd12d567ca.png)

これを解決するエレガントな方法が見当たりません。最も簡単なのは、次のようなものを使用することです。

```scss
#topic-progress-wrapper > span:first-child {
    display: flex;
  }

```

しかし、複数のプラグインやコンポーネントが同じアウトレットを使用する場合、親に `flex` を強制すると、他のコンテンツのスタイルが崩れる可能性があります（これは稀なケースだと思います）。

もしこの `span` に目的がないのであれば、[このファイル](https://github.com/discourse/discourse/blob/main/frontend/discourse/app/templates/topic.gjs) から削除することは可能でしょうか？

---

_[View the full topic](https://meta.discourse.org/t/why-is-the-before-topic-progress-outlet-wrapped-with-a-span/394935)._
