From c62bc2fa35cf0436d53dd68de249b74b1f349d71 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Mon, 3 Jul 2017 14:43:16 +0300 Subject: [PATCH] Do not truncate link previews if viewport can fit more text Fixes #1084 --- client/css/style.css | 11 ++++++++--- client/views/msg_preview.tpl | 8 +++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/client/css/style.css b/client/css/style.css index fe9b32a9..4082cff3 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -1129,15 +1129,20 @@ kbd { } #chat .toggle-content .thumb { - float: left; margin-right: 6px; max-width: 48px; max-height: 32px; } +#chat .toggle-text { + min-width: 0; + display: flex; + flex-direction: column; + white-space: nowrap; +} + #chat .toggle-content .head, #chat .toggle-content .body { - white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } @@ -1151,7 +1156,7 @@ kbd { } #chat .toggle-content.show { - display: inline-block !important; + display: inline-flex !important; } #chat .count { diff --git a/client/views/msg_preview.tpl b/client/views/msg_preview.tpl index 03659742..ef4d602e 100644 --- a/client/views/msg_preview.tpl +++ b/client/views/msg_preview.tpl @@ -9,9 +9,11 @@ {{#if thumb}} {{/if}} -
{{head}}
-
- {{body}} +
+
{{head}}
+
+ {{body}} +
{{/equal}}