From a89659425d9154e1cd7307f7508a326640353563 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Wed, 28 Oct 2015 09:03:37 +0000 Subject: [PATCH] Add new css chat-msg-author as base class. --- css/converse.css | 27 +++++++++++++-------------- mockup/index.html | 18 +++++++++--------- sass/_chatbox.scss | 11 +++++------ src/templates/action.html | 2 +- src/templates/message.html | 2 +- 5 files changed, 29 insertions(+), 31 deletions(-) diff --git a/css/converse.css b/css/converse.css index ccd5b9206..80e79ee54 100644 --- a/css/converse.css +++ b/css/converse.css @@ -512,7 +512,7 @@ #conversejs .chatbox .chat-body .chat-info { color: #6C4C44; color: #808080; - margin: 0.2em 0; } + margin: 0.3em; } #conversejs .chatbox .chat-body .chat-info.chat-event { clear: left; } #conversejs .chatbox .chat-body .chat-info.chat-error { @@ -520,29 +520,28 @@ font-weight: bold; } #conversejs .chatbox .chat-body .chat-info.chat-date { display: inline-block; - padding-top: 10px; } + margin-top: 2em; } #conversejs .chatbox .chat-body .chat-message { - height: 1.5em; - padding: 0.2em 0; } + margin: 0.3em; } #conversejs .chatbox .chat-body .chat-message span { - max-width: 100px; - display: inline-block; - padding-right: 3px; } - #conversejs .chatbox .chat-body .chat-message span.chat-message-author { + display: inline-block; } + #conversejs .chatbox .chat-body .chat-message span.chat-msg-author { + max-width: 100px; font-weight: bold; white-space: nowrap; float: left; text-overflow: ellipsis; overflow: hidden; } - #conversejs .chatbox .chat-body .chat-message span.chat-message-them { + #conversejs .chatbox .chat-body .chat-message span.chat-msg-them { color: #346121; } - #conversejs .chatbox .chat-body .chat-message span.chat-message-me { + #conversejs .chatbox .chat-body .chat-message span.chat-msg-me { color: #436F64; } - #conversejs .chatbox .chat-body .chat-message span.chat-message-content { + #conversejs .chatbox .chat-body .chat-message span.chat-msg-content { + max-width: 100%; word-wrap: break-word; } - #conversejs .chatbox .chat-body .delayed .chat-message-them { + #conversejs .chatbox .chat-body .delayed .chat-msg-them { color: #FB5D50; } - #conversejs .chatbox .chat-body .delayed .chat-message-me { + #conversejs .chatbox .chat-body .delayed .chat-msg-me { color: #7EABBB; } #conversejs .chatbox .chat-content { position: relative; @@ -1153,7 +1152,7 @@ padding: 0.5em 0.5em 0 0.5em; } #conversejs .chatroom .box-flyout .chatroom-body .mentioned { font-weight: bold; } - #conversejs .chatroom .box-flyout .chatroom-body .chat-message-room { + #conversejs .chatroom .box-flyout .chatroom-body .chat-msg-room { color: #346121; } #conversejs .chatroom .box-flyout .chatroom-body .participants { display: table-cell; diff --git a/mockup/index.html b/mockup/index.html index 9b0933fc6..89087d2a4 100644 --- a/mockup/index.html +++ b/mockup/index.html @@ -298,7 +298,7 @@
/help:This is an info message
This is an error message
- 09:35 me:  + 09:35 me:  Hello world @@ -309,16 +309,16 @@ Dagsê
- 19:39 me:  + 19:39 me:  This is a relatively long message to check that wrapping works as expected.
- 19:42 me:  + 19:42 me:  Supercalifragilisticexpialidociousstillnotlongenough
JC Brand is busy
- 19:43 me:  + 19:43 me:  Another message to check that scrolling works.
@@ -374,26 +374,26 @@
- 18:50 luke:  + 18:50 luke:  leia: hi :)
- 19:40 leia:  + 19:40 leia:  I'll be gone for a while, will be back in about an hour
- 19:40 Obi-wan Kenobi, Jedi Master:  + 19:40 Obi-wan Kenobi, Jedi Master:  I'll be gone for a while, will be back in about an hour
- 19:42 me:  + 19:42 me:  Supercalifragilisticexpialidociousstillnotlongenough
- 19:43 Obi-wan Kenobi, Jedi Master:  + 19:43 Obi-wan Kenobi, Jedi Master:  Another message to check that scrolling works.
diff --git a/sass/_chatbox.scss b/sass/_chatbox.scss index 3fad3ebf5..a40122e2e 100644 --- a/sass/_chatbox.scss +++ b/sass/_chatbox.scss @@ -68,7 +68,7 @@ .chat-info { color: $text-color; color: #808080; - margin: 0.2em 0; + margin: 0.3em; &.chat-event { clear: left; } @@ -78,17 +78,15 @@ } &.chat-date { display: inline-block; - padding-top: 10px; + margin-top: 2em; } } .chat-message { - height: 1.5em; - padding: 0.2em 0; + margin: 0.3em; span { - max-width: 100px; display: inline-block; - padding-right: 3px; &.chat-msg-author { + max-width: 100px; font-weight: bold; white-space: nowrap; float: left; @@ -102,6 +100,7 @@ color: $link-color; } &.chat-msg-content { + max-width: 100%; word-wrap: break-word; } } diff --git a/src/templates/action.html b/src/templates/action.html index 58f5d9f4a..5cf728c7e 100644 --- a/src/templates/action.html +++ b/src/templates/action.html @@ -1,4 +1,4 @@
- {{time}} **{{username}} + {{time}} **{{username}} {{message}}
diff --git a/src/templates/message.html b/src/templates/message.html index c7ea3d037..75ef62638 100644 --- a/src/templates/message.html +++ b/src/templates/message.html @@ -1,4 +1,4 @@
- {{time}} {{username}}:  + {{time}} {{username}}:  {{message}}