# 时间线滚动条因两行文本导致高度重叠

**URL:** https://meta.discourse.org/t/timeline-scroller-height-overlap-due-to-two-line-text/248767
**Category:** Bug
**Created:** [2022 年12 月 13 日 10:13 UTC](https://meta.discourse.org/t/timeline-scroller-height-overlap-due-to-two-line-text/248767 "2022-12-13T10:13:43Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### 作者： ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### 发布日期： [2023 年1 月 31 日 18:01 UTC](https://meta.discourse.org/t/timeline-scroller-height-overlap-due-to-two-line-text/248767/8 "2023-01-31T18:01:31Z")

</div>

几周前我对 Discourse 进行了一次更新，试图更好地处理这个问题：

> <https://github.com/discourse/discourse/pull/19912>
>
> This avoids overlaps like this:
> 
> !\[Screenshot 2023-01-18 at 3 24 08 PM\](https:…//user-images.githubusercontent.com/1681963/213286943-81d49629-fd46-470e-ba0a-e0aa2b53dc2a.png)
> 
> This is avoided by constraining the height of the timeline handle's content, so anything more than 2 lines of content is hidden by overflow. The height is set in \`em\`s so this scales appropriately with font and font-size changes. Generally this will only change things for narrow viewports.
> 
> Discussion: https://meta.discourse.org/t/timeline-scroller-height-overlap-due-to-two-line-text/248767
> 
> 
> 
> Before:
> !\[Screenshot 2023-01-18 at 3 21 19 PM\](https://user-images.githubusercontent.com/1681963/213286724-68dcc999-aa47-4185-80bb-92238dab4bb5.png)
> 
> After:
> !\[Screenshot 2023-01-18 at 3 20 43 PM\](https://user-images.githubusercontent.com/1681963/213286718-93b538f4-0e45-4c7f-a6be-3d8ea6c3beae.png)

这会将时间轴强制限制为只显示 2 行文本，隐藏其余部分。因此，当文本可能非常长和/或时间轴可用空间有限（屏幕较窄）时，它可能看起来像这样：

 ![Screenshot 2023-01-31 at 12.57.44 PM](https://global.discourse-cdn.com/meta/original/4X/8/5/b/85bf14196b56ff5458cf87e99c53fc317c6ad5d7.png)

这会在某些情况下隐藏处理中的部分或全部日期信息，但可以防止后退按钮出现布局问题，并避免与时间轴顶部的日期重叠。

时间轴上的日期信息与帖子本身的日期信息有些重复，因此为了避免布局中断的问题，这似乎是一个值得的权衡。

---

_[View the full topic](https://meta.discourse.org/t/timeline-scroller-height-overlap-due-to-two-line-text/248767)._
