Skip to content

Commit 3f09362

Browse files
authored
fix(MessageList): set width on message list scroll container (#3077)
### 🎯 Goal `.str-chat__message-list-scroll` is a flex child inside `.str-chat__message-list` (which uses `display: flex; justify-content: center`), but it had no `width` set β€” so it shrink-wrapped its content instead of filling the available space up to its `max-width`. ### πŸ›  Implementation details - Added `width: 100%` to `.str-chat__message-list-scroll` in `MessageList.scss` so it expands to fill the parent, capped by the existing `max-width` - Removed the now-redundant `width: 100%` override from the vite example app's `index.scss` ### 🎨 UI Changes No visual change in the vite example app (which already had the workaround). Other consumers that didn't apply their own override will now see the message list correctly fill the available width.
1 parent cf682c2 commit 3f09362

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

β€Žexamples/vite/src/index.scssβ€Ž

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,6 @@ body {
213213
max-width: none;
214214
}
215215

216-
.str-chat__message-list-scroll {
217-
width: 100%;
218-
}
219-
220216
.str-chat__list,
221217
.str-chat__virtual-list {
222218
display: block;

β€Žsrc/components/MessageList/styling/MessageList.scssβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
.str-chat__message-list-scroll {
3232
@include utils.message-list-spacing;
33+
width: 100%;
3334
max-width: var(--str-chat__message-list-scroll-max-width);
3435
.str-chat__ul {
3536
list-style: none;

0 commit comments

Comments
Β (0)