Commit b154d6d5 authored by JC Brand's avatar JC Brand

Render chat head, content and message form as flex items.

parent e3350ab7
......@@ -43,11 +43,9 @@
height: calc(100% - 55px); }
#conversejs.converse-embedded .chatroom .box-flyout .occupants-heading {
font-size: 120%; }
#conversejs.converse-embedded .chatroom .box-flyout .chat-content {
height: calc(100% - 97px); }
#conversejs.converse-embedded .chatroom .box-flyout .chat-content .chat-message {
margin: 0.5em;
font-size: 120%; }
#conversejs.converse-embedded .chatroom .box-flyout .chat-content .chat-message {
margin: 0.5em;
font-size: 120%; }
#conversejs.converse-embedded .chatroom .box-flyout .sendXMPPMessage .chat-textarea {
padding: 0.5em;
font-size: 110%; }
......
......@@ -5228,6 +5228,9 @@ body.reset {
background-color: #e7f7ee; }
#converse-embedded-chat .chatbox .box-flyout,
#conversejs .chatbox .box-flyout {
display: flex;
flex-direction: column;
justify-content: space-between;
background-color: white;
box-shadow: 1px 3px 5px 3px rgba(0, 0, 0, 0.4);
height: 450px;
......@@ -5261,13 +5264,14 @@ body.reset {
width: 100%; }
#converse-embedded-chat .chatbox .chat-body,
#conversejs .chatbox .chat-body {
background-color: white;
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
background-color: #3AA569;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top: 0;
height: 289px;
height: -webkit-calc(100% - 55px);
height: calc(100% - 55px); }
border-top: 0; }
@media screen and (max-height: 450px) {
#converse-embedded-chat .chatbox .chat-body,
#conversejs .chatbox .chat-body {
......@@ -5363,23 +5367,20 @@ body.reset {
white-space: nowrap; }
#converse-embedded-chat .chatbox .chat-content,
#conversejs .chatbox .chat-content {
position: relative;
padding: 0.5em;
font-size: 13px;
color: #777;
overflow-y: auto;
border: 0;
background-color: #ffffff;
line-height: 1.3em;
height: 206px;
height: calc(100% - 96px); }
line-height: 1.3em; }
#converse-embedded-chat .chatbox .chat-content .toggle-spoiler:before,
#conversejs .chatbox .chat-content .toggle-spoiler:before {
padding-right: 0.25em;
whitespace: nowrap; }
#converse-embedded-chat .chatbox .chat-content-sendbutton,
#conversejs .chatbox .chat-content-sendbutton {
height: calc(100% - 128px); }
height: calc(100% - 93px); }
#converse-embedded-chat .chatbox .dropdown,
#conversejs .chatbox .dropdown {
/* status dropdown styles */
......@@ -5397,12 +5398,9 @@ body.reset {
border-bottom-left-radius: 4px;
background-clip: padding-box;
background-color: white;
border-top: 1px solid #BBB;
border: 0;
margin: 0;
padding: 0;
position: relative;
height: 95px; }
padding: 0; }
@media screen and (max-height: 450px) {
#converse-embedded-chat .chatbox .sendXMPPMessage,
#conversejs .chatbox .sendXMPPMessage {
......@@ -5420,11 +5418,10 @@ body.reset {
border-top-right-radius: 0;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
height: 70px;
padding: 0.5em;
width: 100%;
border: none;
resize: none; }
min-height: 60px; }
#converse-embedded-chat .chatbox .sendXMPPMessage .chat-textarea.spoiler,
#conversejs .chatbox .sendXMPPMessage .chat-textarea.spoiler {
height: 42px; }
......@@ -5444,7 +5441,6 @@ body.reset {
box-sizing: border-box;
margin: 0;
padding: 0.25em;
height: 25px;
display: block;
border-top: 8px solid #3AA569;
background-color: white;
......@@ -6184,6 +6180,7 @@ body.reset {
height: 100vh; } }
#converse-embedded-chat .chatroom .box-flyout .chatroom-body,
#conversejs .chatroom .box-flyout .chatroom-body {
flex-direction: row;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
background-color: white;
......@@ -6218,6 +6215,8 @@ body.reset {
padding: 2em 2em 0 2em; }
#converse-embedded-chat .chatroom .box-flyout .chatroom-body .chat-area,
#conversejs .chatroom .box-flyout .chatroom-body .chat-area {
display: flex;
flex-direction: column;
word-wrap: break-word;
min-width: 200px; }
#converse-embedded-chat .chatroom .box-flyout .chatroom-body .chat-area .new-msgs-indicator,
......@@ -6226,6 +6225,7 @@ body.reset {
max-width: 70%; }
#converse-embedded-chat .chatroom .box-flyout .chatroom-body .chat-area .chat-content,
#conversejs .chatroom .box-flyout .chatroom-body .chat-area .chat-content {
height: 100%;
padding: 0.5em; }
#converse-embedded-chat .chatroom .box-flyout .chatroom-body .chat-area.full,
#conversejs .chatroom .box-flyout .chatroom-body .chat-area.full {
......@@ -6339,8 +6339,6 @@ body.reset {
font-size: 14px;
height: 289px;
width: 100%;
height: -webkit-calc(100% - 55px);
height: calc(100% - 55px);
overflow-y: auto;
position: absolute; }
#converse-embedded-chat .chatroom .box-flyout .chatroom-body .chatroom-form-container .validation-message,
......
This diff is collapsed.
......@@ -90,6 +90,97 @@
</span>
<span class="chat-msg-content">Another message to check that scrolling works.</span>
</div>
<div class="chat-message">
<span class="chat-msg-author chat-msg-me">19:43&nbsp;
<canvas height="24" width="24" class="avatar"></canvas>
<span class="chat-msg-me">me:&nbsp;</span>
</span>
<span class="chat-msg-content">Another message to check that scrolling works.</span>
</div>
<div class="chat-message">
<span class="chat-msg-author chat-msg-me">19:43&nbsp;
<canvas height="24" width="24" class="avatar"></canvas>
<span class="chat-msg-me">me:&nbsp;</span>
</span>
<span class="chat-msg-content">Another message to check that scrolling works.</span>
</div>
<div class="chat-message">
<span class="chat-msg-author chat-msg-me">19:43&nbsp;
<canvas height="24" width="24" class="avatar"></canvas>
<span class="chat-msg-me">me:&nbsp;</span>
</span>
<span class="chat-msg-content">Another message to check that scrolling works.</span>
</div>
<div class="chat-message">
<span class="chat-msg-author chat-msg-me">19:43&nbsp;
<canvas height="24" width="24" class="avatar"></canvas>
<span class="chat-msg-me">me:&nbsp;</span>
</span>
<span class="chat-msg-content">Another message to check that scrolling works.</span>
</div>
<div class="chat-message">
<span class="chat-msg-author chat-msg-me">19:43&nbsp;
<canvas height="24" width="24" class="avatar"></canvas>
<span class="chat-msg-me">me:&nbsp;</span>
</span>
<span class="chat-msg-content">Another message to check that scrolling works.</span>
</div>
<div class="chat-message">
<span class="chat-msg-author chat-msg-me">19:43&nbsp;
<canvas height="24" width="24" class="avatar"></canvas>
<span class="chat-msg-me">me:&nbsp;</span>
</span>
<span class="chat-msg-content">Another message to check that scrolling works.</span>
</div>
<div class="chat-message">
<span class="chat-msg-author chat-msg-me">19:43&nbsp;
<canvas height="24" width="24" class="avatar"></canvas>
<span class="chat-msg-me">me:&nbsp;</span>
</span>
<span class="chat-msg-content">Another message to check that scrolling works.</span>
</div>
<div class="chat-message">
<span class="chat-msg-author chat-msg-me">19:43&nbsp;
<canvas height="24" width="24" class="avatar"></canvas>
<span class="chat-msg-me">me:&nbsp;</span>
</span>
<span class="chat-msg-content">Another message to check that scrolling works.</span>
</div>
<div class="chat-message">
<span class="chat-msg-author chat-msg-me">19:43&nbsp;
<canvas height="24" width="24" class="avatar"></canvas>
<span class="chat-msg-me">me:&nbsp;</span>
</span>
<span class="chat-msg-content">Another message to check that scrolling works.</span>
</div>
<div class="chat-message">
<span class="chat-msg-author chat-msg-me">19:43&nbsp;
<canvas height="24" width="24" class="avatar"></canvas>
<span class="chat-msg-me">me:&nbsp;</span>
</span>
<span class="chat-msg-content">Another message to check that scrolling works.</span>
</div>
<div class="chat-message">
<span class="chat-msg-author chat-msg-me">19:43&nbsp;
<canvas height="24" width="24" class="avatar"></canvas>
<span class="chat-msg-me">me:&nbsp;</span>
</span>
<span class="chat-msg-content">Another message to check that scrolling works.</span>
</div>
<div class="chat-message">
<span class="chat-msg-author chat-msg-me">19:43&nbsp;
<canvas height="24" width="24" class="avatar"></canvas>
<span class="chat-msg-me">me:&nbsp;</span>
</span>
<span class="chat-msg-content">Another message to check that scrolling works.</span>
</div>
<div class="chat-message">
<span class="chat-msg-author chat-msg-me">19:43&nbsp;
<canvas height="24" width="24" class="avatar"></canvas>
<span class="chat-msg-me">me:&nbsp;</span>
</span>
<span class="chat-msg-content">Another message to check that scrolling works.</span>
</div>
</div>
<form class="sendXMPPMessage">
......
......@@ -112,6 +112,9 @@
}
.box-flyout {
display: flex;
flex-direction: column;
justify-content: space-between;
background-color: white;
box-shadow: 1px 3px 5px 3px rgba(0, 0, 0, 0.4);
height: $chat-height;
......@@ -144,7 +147,11 @@
}
}
.chat-body {
background-color: white;
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
background-color: $chat-head-color;
border-bottom-left-radius: $chatbox-border-radius;
border-bottom-right-radius: $chatbox-border-radius;
@media screen and (max-height: $mobile-landscape-height) {
......@@ -156,8 +163,6 @@
border-bottom-right-radius: 0;
}
border-top: 0;
height: 289px;
@include calc(height, '100% - #{$chat-head-height}');
p {
color: $text-color;
font-size: $font-size;
......@@ -250,7 +255,6 @@
white-space: nowrap;
}
.chat-content {
position: relative;
padding: 0.5em;
font-size: 13px;
color: $text-color;
......@@ -258,8 +262,6 @@
border: 0;
background-color: #ffffff;
line-height: 1.3em;
height: 206px;
height: calc(100% - #{$toolbar-height + $chat-textarea-height +1px});
.toggle-spoiler:before {
padding-right: 0.25em;
......@@ -267,7 +269,7 @@
}
}
.chat-content-sendbutton {
height: calc(100% - #{$toolbar-height + $chat-textarea-height + $send-button-height + 2*$send-button-margin});
height: calc(100% - #{$chat-textarea-height + $send-button-height + 2*$send-button-margin});
}
.dropdown { /* status dropdown styles */
......@@ -285,12 +287,9 @@
@include border-bottom-radius($chatbox-border-radius);
background-clip: padding-box;
background-color: white;
border-top: 1px solid #BBB;
border: 0;
margin: 0;
padding: 0;
position: relative;
height: #{$chat-textarea-height + $toolbar-height};
@media screen and (max-height: $mobile-landscape-height) {
width: 100%;
}
......@@ -306,11 +305,10 @@
border-top-left-radius: 0;
border-top-right-radius: 0;
@include border-bottom-radius($chatbox-border-radius);
height: $chat-textarea-height;
padding: 0.5em;
width: 100%;
border: none;
resize: none;
min-height: $chat-textarea-height;
&.spoiler {
height: 42px;
}
......@@ -331,7 +329,6 @@
box-sizing: border-box;
margin: 0;
padding: 0.25em;
height: $toolbar-height;
display: block;
border-top: 8px solid $chat-head-color;
background-color: white;
......
......@@ -82,6 +82,7 @@
height: 100vh;
}
.chatroom-body {
flex-direction: row;
@include border-bottom-radius($chatbox-border-radius);
background-color: white;
border-top: 0;
......@@ -120,6 +121,8 @@
padding: 2em 2em 0 2em;
}
.chat-area {
display: flex;
flex-direction: column;
word-wrap: break-word;
min-width: $chat-width;
.new-msgs-indicator {
......@@ -127,6 +130,7 @@
max-width: 70%;
}
.chat-content {
height: 100%;
padding: 0.5em;
}
&.full {
......@@ -246,7 +250,6 @@
font-size: $font-size;
height: 289px;
width: 100%;
@include calc(height, '100% - #{$chat-head-height}');
overflow-y: auto;
position: absolute;
......
......@@ -54,7 +54,6 @@
font-size: 120%;
}
.chat-content {
height: calc(100% - #{$toolbar-height + $chat-textarea-height +2px});
.chat-message {
margin: 0.5em;
font-size: 120%;
......
......@@ -48,7 +48,7 @@ $light-text-color: #A8ABA1 !default;
$border-color: #CCC !default;
$icon-color: $blue !default;
$save-button-color: $green !default;
$chat-textarea-height: 70px !default;
$chat-textarea-height: 60px !default;
$send-button-height: 27px !default;
$send-button-margin: 3px !default;
......@@ -101,7 +101,6 @@ $font-size-large: 16px !default;
$font-size-huge: 20px !default;
$legend-font-size: 16px !default;
$toolbar-height: 25px !default;
$toolbar-color: $greenish-white !default;
$emoji-picker-height: 100px !default;
......
......@@ -13,7 +13,7 @@
font-size: 20px;
padding: 0;
.user-custom-message {
font-size: 66%;
font-size: 50%;
height: auto;
line-height: $line-height;
}
......@@ -55,6 +55,7 @@
}
}
.chat-content {
height: 100%;
padding: 0 $padding $padding $padding;
border-top-left-radius: $chatbox-border-radius;
border-top-right-radius: $chatbox-border-radius;
......
......@@ -26,7 +26,6 @@
.chat-area {
border-top-left-radius: $chatbox-border-radius;
min-width: auto;
height: calc(100vh - 95px);
.chat-content {
border-top-left-radius: $chatbox-border-radius;
......
......@@ -65,7 +65,7 @@ $chat-head-text-color: white !default;
$chat-head-inverse-text-color: white !default;
$chat-head-height: 62px !default;
$chat-textarea-height: 70px !default;
$chat-textarea-height: 60px !default;
$input-focus-color: #1A9707 !default;
$highlight-color: #DCF9F6 !default;
......@@ -104,13 +104,12 @@ $font-size-large: 18px !default;
$font-size-huge: 26px !default;
$legend-font-size: 18px !default;
$toolbar-height: 29px !default;
$toolbar-color: $greenish-white !default;
$line-height-small: 20px !default;
$line-height: 22px !default;
$line-height-large: 24px !default;
$line-height-huge: 30px !default;
$line-height-huge: 26px !default;
$controlbox-width: 250px !default;
$chat-width: 100% !default;
......
......@@ -13,7 +13,6 @@
@import "bootstrap/scss/variables";
@import "bootstrap/scss/mixins";
@import "../fonts";
#conversejs {
@import "bootstrap/scss/root";
@import "bootstrap/scss/reboot";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment