修复"查找聊天记录"列表条目上下错位、长内容不换行溢出的问题

.library-message-results > button 沿用全局 button{height:2.2rem} 的重置,与自己的
min-height:5.5rem 叠加后变成一个"clamp出来的定长"而非auto——内容一旦比这个定长高(比如摘要
换行),这一条本身不会长高,而是让自己末尾的 <small> 时间戳溢出到下一条的发送人名字位置,
视觉上像是变成了下一条的开头,看着上下错位。同一个全局重置还带了 white-space:nowrap,摘要
<p> 继承后完全不换行,比栏宽的内容(尤其是链接)直接顶穿右边界。

改用 height:auto 让每一条按内容真实需要的高度伸展;<p> 补 white-space:normal +
overflow-wrap:anywhere(跟 .bubble div.message-content 处理长链接的方式一致)。移动端窄屏下
实机复现后验证:摘要正确换行、每条自己的时间戳不再越界到下一条。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Your Name
2026-09-07 20:09:06 +08:00
co-authored by Claude Sonnet 5
parent 7981083cad
commit 97a6b88d59
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -11812,6 +11812,7 @@ div.toast.show {
align-items: start;
gap: 0.8rem;
width: 100%;
height: auto;
min-height: 5.5rem;
margin: 0;
padding: 0.8rem 1rem;
@@ -11829,10 +11830,22 @@ div.toast.show {
min-width: 0;
}
/* The global button{} reset's height:2.2rem clamps up to this row's own min-height (5.5rem) but
stays a DEFINITE height rather than becoming auto -- so a snippet long enough to wrap past what
5.5rem holds (any real search hit, not just short mock text) doesn't grow the row to fit; it
overflows past the row's own border-bottom into the next entry's space instead (confirmed live:
this row's own trailing <small> timestamp rendered overlapping the NEXT row's sender name).
height:auto above lets the row grow past min-height like a plain block would. Same reset also
sets white-space:nowrap, which the snippet <p> inherits -- with no wrapping at all, anything past
the column width (a long link, not just long plain text) runs off the right edge instead of
wrapping. overflow-wrap:anywhere matches .bubble div.message-content's own handling of the same
kind of long, space-free URL text. */
.library-message-results p {
margin: 0.3rem 0;
color: #666e78;
line-height: 1.5;
white-space: normal;
overflow-wrap: anywhere;
}
.library-message-results mark {
+1 -1
View File
File diff suppressed because one or more lines are too long