fixed some css pbm with chat msg

This commit is contained in:
simplonco
2022-12-31 20:28:16 +01:00
parent 0060f5daf7
commit ec639f71c1
6 changed files with 78 additions and 167 deletions

View File

@@ -23,6 +23,7 @@
width: auto;
height: auto;
border: 1px solid black;
z-index: 1;
}

View File

@@ -46,7 +46,6 @@
/* default config
*/
button {
display: flex;
padding: 0px;
margin: auto;
width: 100%;

View File

@@ -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;
}