161 lines
3.2 KiB
SCSS
Raw Normal View History

2019-10-21 13:20:14 +09:00
$otherBox-line: #cccccc;
$otherBox-bg: #ffffff;
$meBox-line: #cccccc;
$meBox-bg: #ffffff;
.chat-messages {
padding: 30px 40px;
display: flex;
flex-direction: column;
2019-10-24 10:07:30 +09:00
}
2019-10-30 16:22:49 +09:00
.information-msg {
/* width: 100%;
2019-10-30 16:22:49 +09:00
height: 100%;
text-align: center;
2019-11-20 17:31:08 +09:00
background-color: rgba(0, 0, 0, 0.1);
2019-10-30 16:22:49 +09:00
padding: 10px;
margin: 10px 0;*/
2019-10-29 19:06:25 +09:00
}
2019-10-24 10:07:30 +09:00
.message-row {
2019-10-31 19:17:29 +09:00
margin-bottom: 20px;
2019-10-30 16:22:49 +09:00
.date-splitter {
display: block;
width: 100%;
margin-bottom: 10px;
2019-10-24 10:07:30 +09:00
}
2019-10-30 16:22:49 +09:00
.chat-row {
2019-10-21 13:20:14 +09:00
position: relative;
display: flex;
flex-direction: row;
2019-11-08 08:58:22 +09:00
margin-left: 0;
2019-10-24 10:07:30 +09:00
.profile-img {
flex: 0 0 auto;
2019-11-08 08:58:22 +09:00
img {
2019-10-31 19:17:29 +09:00
border-radius: 50%;
}
2019-10-24 10:07:30 +09:00
}
}
&.me {
2019-10-30 16:22:49 +09:00
.chat-row {
2019-10-21 13:20:14 +09:00
flex-direction: row-reverse;
2019-11-20 17:31:08 +09:00
margin-left: 0;
2019-11-08 08:58:22 +09:00
margin-right: 0;
2019-10-21 13:20:14 +09:00
.profile-info {
flex-direction: row-reverse;
display: flex;
justify-content: flex-end;
}
2019-10-30 16:22:49 +09:00
}
2019-10-21 13:20:14 +09:00
}
.message-main {
margin-left: 20px;
margin-right: 10px;
2019-11-01 17:33:14 +09:00
max-width: 80%;
2019-10-21 13:20:14 +09:00
.chat-name {
font-size: 12px;
color: #333333;
margin-bottom: 6px;
}
.bubble {
border: 1px solid $otherBox-line;
font-weight: 900;
position: relative;
background-color: $otherBox-bg;
border-radius: 4px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
2019-11-01 16:44:28 +09:00
word-break: break-all;
word-wrap: break-word;
2019-10-21 13:20:14 +09:00
&:before {
content: '';
width: 0px;
height: 0px;
position: absolute;
border-left: 6px solid transparent;
border-right: 6px solid $otherBox-line;
border-top: 6px solid $otherBox-line;
border-bottom: 6px solid transparent;
left: -12px;
top: 4px;
}
&:after {
content: '';
width: 0px;
height: 0px;
position: absolute;
border-left: 6px solid transparent;
border-right: 6px solid $otherBox-bg;
border-top: 6px solid $otherBox-bg;
border-bottom: 6px solid transparent;
left: -10px;
top: 5px;
}
}
}
.secondary-text {
align-self: flex-end;
font-size: 11px;
2019-10-30 16:22:49 +09:00
color: #666666;
2019-10-21 13:20:14 +09:00
word-wrap: break-word;
white-space: nowrap;
}
2019-10-30 16:22:49 +09:00
&.me {
.secondary-text {
text-align: end;
}
}
2019-12-23 15:23:27 +09:00
&.searched {
color: red;
}
2019-10-21 13:20:14 +09:00
}
.message-row.me > .bubble {
border: 1px solid $meBox-line;
background-color: $meBox-bg;
}
.message-row.me {
2019-10-21 15:04:10 +09:00
.profile-img {
display: none;
2019-10-21 13:20:14 +09:00
}
2019-10-21 15:04:10 +09:00
.chat-name {
display: none;
2019-10-21 13:20:14 +09:00
}
.message-main {
text-align: right;
margin-left: 10px;
margin-right: 20px;
& .bubble:before {
content: '';
width: 0px;
height: 0px;
position: absolute;
border-left: 6px solid $meBox-line;
border-right: 6px solid transparent;
border-top: 6px solid $meBox-line;
border-bottom: 6px solid transparent;
left: initial;
right: -12px;
top: 4px;
}
& .bubble:after {
content: '';
width: 0px;
height: 0px;
position: absolute;
border-left: 6px solid $meBox-bg;
border-right: 6px solid transparent;
border-top: 6px solid $meBox-bg;
border-bottom: 6px solid transparent;
left: initial;
right: -10px;
top: 5px;
}
}
2019-10-30 16:22:49 +09:00
}
2019-11-08 08:58:22 +09:00
.bubble-main {
word-wrap: break-word;
white-space: pre-wrap;
2019-11-21 15:00:19 +09:00
word-break: break-word;
2019-11-01 17:33:14 +09:00
}