Skip to content

Commit 0d4b933

Browse files
committed
fix: white space incosistency in quoted messages, clamp quoted messages
1 parent 749af40 commit 0d4b933

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/v2/styles/Message/Message-layout.scss

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
var(--str-chat__quoted-message-inside-message-input-max-width) +
2424
calc(var(--str-chat__spacing-px) * 50)
2525
);
26+
27+
/* The maximum number of lines displayed for quoted messages, set to "none" to turn off clamping */
28+
--str-chat__quoted-message-line-clamp: 5;
2629
}
2730

2831
.str-chat__message {
@@ -59,12 +62,21 @@
5962
}
6063
}
6164

65+
.str-chat__quoted-message-txt {
66+
overflow: hidden;
67+
display: -webkit-box;
68+
-webkit-line-clamp: var(--str-chat__quoted-message-line-clamp);
69+
line-clamp: var(--str-chat__quoted-message-line-clamp);
70+
-webkit-box-orient: vertical;
71+
}
72+
6273
.str-chat__message,
6374
.str-chat__quoted-message-preview {
6475
@mixin chat-bubble-spacing {
6576
padding: var(--str-chat__spacing-2) var(--str-chat__spacing-4);
6677

6778
p {
79+
white-space: pre-line;
6880
margin: 0;
6981
}
7082
}
@@ -165,10 +177,6 @@
165177
.str-chat__message-text-inner {
166178
@include utils.prevent-glitch-text-overflow;
167179
}
168-
169-
p {
170-
white-space: pre-line;
171-
}
172180
}
173181
}
174182
}
@@ -357,7 +365,6 @@
357365
}
358366
}
359367

360-
361368
.str-chat__message-inner {
362369
.str-chat__message-options {
363370
display: none;

0 commit comments

Comments
 (0)