fixed some css pbm with chat msg
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
width: auto;
|
||||
height: auto;
|
||||
border: 1px solid black;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
/* default config
|
||||
*/
|
||||
button {
|
||||
display: flex;
|
||||
padding: 0px;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
|
||||
@@ -11,12 +11,10 @@
|
||||
let msg = "";
|
||||
let text_area;
|
||||
let msgs = [];
|
||||
let index = 0;
|
||||
|
||||
function add_msg(from, the_msg)
|
||||
{
|
||||
msgs = [...msgs, { id: index, content: the_msg, name: from }];
|
||||
index++;
|
||||
msgs = [...msgs, { content: the_msg, name: from }];
|
||||
}
|
||||
|
||||
function send_msg()
|
||||
@@ -63,7 +61,7 @@
|
||||
<!-- msg -->
|
||||
<div class="panel panel_msg">
|
||||
<div class="msg_thread">
|
||||
{#each msgs as msg (msg.id)}
|
||||
{#each msgs as msg}
|
||||
<Msg name={msg.name}>{@html msg.content}</Msg>
|
||||
{/each}
|
||||
</div>
|
||||
@@ -108,11 +106,11 @@
|
||||
|
||||
/* write area
|
||||
*/
|
||||
.panel_write {
|
||||
.grid_box .panel_write {
|
||||
border: none;
|
||||
overflow: visible;
|
||||
}
|
||||
.text_area {
|
||||
.grid_box .text_area {
|
||||
display: block;
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
@@ -125,23 +123,23 @@
|
||||
background-color: white;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.text_area:focus {
|
||||
.grid_box .text_area:focus {
|
||||
height: auto;
|
||||
min-height: 100%;
|
||||
max-height: 300px;
|
||||
}
|
||||
.panel_write .text_area :global(*) {
|
||||
.grid_box .panel_write .text_area :global(*) {
|
||||
display: block ruby;
|
||||
}
|
||||
|
||||
|
||||
/* msg area
|
||||
*/
|
||||
.panel_msg {
|
||||
.grid_box .panel_msg {
|
||||
flex-direction: column-reverse;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.msg_thread {
|
||||
.grid_box .msg_thread {
|
||||
width: 100%;
|
||||
padding: 0px 5px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user