Skip to content

Commit

Permalink
fix: white space incosistency in quoted messages, clamp quoted messages
Browse files Browse the repository at this point in the history
  • Loading branch information
szuperaz committed Jan 15, 2025
1 parent 749af40 commit e68a7c0
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/v2/styles/Message/Message-layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
var(--str-chat__quoted-message-inside-message-input-max-width) +
calc(var(--str-chat__spacing-px) * 50)
);

/* The maximum number of lines displayed for quoted messages, set to "none" to turn off clamping */
--str-chat__quoted-message-line-clamp: 5;
}

.str-chat__message {
Expand Down Expand Up @@ -59,12 +62,21 @@
}
}

.str-chat__quoted-message-text-value {
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: var(--str-chat__quoted-message-line-clamp);
line-clamp: var(--str-chat__quoted-message-line-clamp);
-webkit-box-orient: vertical;
}

.str-chat__message,
.str-chat__quoted-message-preview {
@mixin chat-bubble-spacing {
padding: var(--str-chat__spacing-2) var(--str-chat__spacing-4);

p {
white-space: pre-line;
margin: 0;
}
}
Expand Down Expand Up @@ -165,10 +177,6 @@
.str-chat__message-text-inner {
@include utils.prevent-glitch-text-overflow;
}

p {
white-space: pre-line;
}
}
}
}
Expand Down Expand Up @@ -357,7 +365,6 @@
}
}


.str-chat__message-inner {
.str-chat__message-options {
display: none;
Expand Down

0 comments on commit e68a7c0

Please sign in to comment.