Skip to content

Commit e65be9f

Browse files
authored
fix: align chat messages with prompt input (#366)
Messages were horizontally offset from the prompt input due to the scrollbar taking space on one side. Adding `scrollbar-gutter: stable both-edges` reserves symmetric space for scrollbars, keeping content centered and aligned with the prompt.
1 parent df954b1 commit e65be9f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/chat-bot.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,9 @@ export default function ChatBot({ threadId, initialMessages }: Props) {
429429
) : (
430430
<>
431431
<div
432-
className={"flex flex-col gap-2 overflow-y-auto py-6 z-10"}
432+
className={
433+
"flex flex-col gap-2 overflow-y-auto py-6 z-10 [scrollbar-gutter:stable_both-edges]"
434+
}
433435
ref={containerRef}
434436
onScroll={handleScroll}
435437
>

0 commit comments

Comments
 (0)