From 35b6b47de33700946261604d7aeba5bad1a67fcc Mon Sep 17 00:00:00 2001 From: Maxime Poulin Date: Sat, 3 Sep 2016 21:29:48 -0400 Subject: [PATCH 1/2] Remove table layout for chat messages (and fix layout issues yet again) --- client/css/style.css | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/client/css/style.css b/client/css/style.css index 3287eba4..14603d2b 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -832,15 +832,15 @@ kbd { } #chat .messages { - display: table; - table-layout: fixed; - width: 100%; padding: 10px 0; } #chat .msg { word-wrap: break-word; word-break: break-word; /* Webkit-specific */ + display: flex; + overflow: hidden; + position: relative; } #chat .unread-marker { @@ -912,16 +912,15 @@ kbd { #chat .time, #chat .from, #chat .text { - display: table-cell; + display: block; padding: 2px 0; - vertical-align: top; + flex: 0 0 auto; } #chat .time { color: #ddd; text-align: right; - max-width: 46px; - min-width: 46px; + width: 46px; } #chat .from { @@ -929,8 +928,14 @@ kbd { color: #b1c3ce; padding-right: 10px; text-align: right; - max-width: 134px; - min-width: 134px; + width: 134px; + align-self: stretch; +} + +#chat .text { + margin: auto; + overflow: hidden; + flex: 1 1 auto; } #loading a, From fb672ab57ff2a6d5ae8a54b2acef64d4e4354513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Thu, 30 Mar 2017 19:50:36 -0400 Subject: [PATCH 2/2] Improvements to the new flex layout for messages --- client/css/style.css | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/client/css/style.css b/client/css/style.css index 14603d2b..fc111802 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -929,12 +929,9 @@ kbd { padding-right: 10px; text-align: right; width: 134px; - align-self: stretch; } #chat .text { - margin: auto; - overflow: hidden; flex: 1 1 auto; } @@ -1001,14 +998,6 @@ kbd { color: #999; } -#chat .msg.motd .text, -#chat .msg.message .text, -#chat .msg.action .action-text, -#chat .msg.notice .text { - white-space: pre-wrap; - overflow: hidden; -} - #chat .msg.channel_list_loading .text { color: #999; font-style: italic;