fix(chat): improve text bubble layout to fill width and prevent overflow

This commit is contained in:
2026-06-11 17:25:54 +08:00
parent be6abaacd8
commit e68aa09395
2 changed files with 10 additions and 2 deletions
@@ -1,7 +1,8 @@
/* TextBubble 文字气泡样式 */
.bubble {
display: inline-block;
/* 撑满父(cap by max-width: 75%)—— 让文字装满宽度再换行 */
width: 100%;
padding: var(--spacing-3, 12px) var(--spacing-4, 16px);
border-radius: var(--radius-xxl, 24px);
max-width: 75%;
@@ -16,6 +17,8 @@
background: #fff;
color: var(--color-text-foreground, #000);
border-top-left-radius: 0;
/* 撑满父 cross-axis= MessageContent 宽) */
align-self: stretch;
}
.bubbleUser {
@@ -26,4 +29,6 @@
);
color: #fff;
border-top-right-radius: 0;
/* 撑满父 cross-axis= MessageContent 宽) */
align-self: stretch;
}