Files
cozsweet-frontend-nextjs/src/app/chat/components/chat-area.module.css
T
admin 2b6d3924fd fix(chat): right-align user message row for proper mirror layout
Add align-self: flex-end to .bubbleRowUser so the user message row
sizes to its content and pins to the right edge of the chat area.
Combined with the existing flex-end cross-axis alignment, this places
the user avatar at the right edge with the bubble to its left,
producing a proper left-to-right AI / right-to-left user mirror.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-11 14:03:46 +08:00

107 lines
2.4 KiB
CSS

/* ChatArea 消息列表样式 */
.area {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
padding: var(--spacing-4, 16px) var(--spacing-5, 20px);
display: flex;
flex-direction: column;
gap: var(--spacing-3, 12px);
}
.dateHeader {
display: flex;
align-items: center;
justify-content: center;
margin: var(--spacing-2, 8px) 0;
}
.dateChip {
background: var(--color-surface-muted, rgba(255, 255, 255, 0.06));
border-radius: var(--radius-md, 8px);
padding: var(--spacing-1, 4px) var(--spacing-3, 12px);
font-size: var(--font-size-xs, 11px);
opacity: 0.75;
}
.aiDisclosure {
align-self: center;
background: var(--color-surface-muted, rgba(255, 255, 255, 0.06));
border-radius: var(--radius-md, 8px);
padding: var(--spacing-2, 8px) var(--spacing-4, 16px);
font-size: var(--font-size-sm, 12px);
opacity: 0.75;
text-align: center;
}
.bubbleRowAi {
display: flex;
flex-direction: row;
align-items: flex-start;
gap: var(--spacing-1, 4px);
}
.bubbleRowUser {
display: flex;
flex-direction: row;
align-items: flex-end;
align-self: flex-end;
gap: var(--spacing-1, 4px);
}
.bubbleAi {
max-width: 75%;
background: var(--color-bubble-ai, rgba(255, 255, 255, 0.08));
padding: var(--spacing-3, 12px) var(--spacing-4, 16px);
border-radius: var(--radius-lg, 12px);
font-size: var(--font-size-base, 14px);
line-height: 1.45;
white-space: pre-wrap;
word-break: break-word;
}
.bubbleUser {
max-width: 75%;
background: var(--color-bubble-user, #4f46e5);
padding: var(--spacing-3, 12px) var(--spacing-4, 16px);
border-radius: var(--radius-lg, 12px);
font-size: var(--font-size-base, 14px);
line-height: 1.45;
white-space: pre-wrap;
word-break: break-word;
color: #fff;
}
.bubbleTime {
font-size: var(--font-size-xs, 11px);
opacity: 0.5;
}
.typingBubble {
display: flex;
align-items: center;
gap: var(--spacing-1, 4px);
padding: var(--spacing-3, 12px) var(--spacing-4, 16px);
background: var(--color-bubble-ai, rgba(255, 255, 255, 0.08));
border-radius: var(--radius-lg, 12px);
width: fit-content;
}
.typingDot {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
background: currentColor;
margin: 0 2px;
animation: typingBlink 1.2s infinite;
}
.typingDot:nth-child(2) { animation-delay: 0.15s; }
.typingDot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBlink {
0%, 60%, 100% { opacity: 0.2; }
30% { opacity: 1; }
}