xmpp.chapril.org-conversejs/sass/_messages.scss

365 lines
10 KiB
SCSS
Raw Normal View History

#conversejs {
.older-msg {
time {
font-weight: bold;
}
}
.message {
2018-08-16 12:15:23 +02:00
.mention {
font-weight: bold;
}
.mention--self {
font-weight: normal;
}
&.date-separator {
height: 2em;
margin: 0;
position: relative;
text-align: center;
z-index: 0;
.separator {
border-top: 0px;
border-bottom: var(--chat-separator-border-bottom);
margin: 0 1em;
position: relative;
top: 1em;
z-index: 5;
}
.separator-text {
background: white;
bottom: 1px; // Offset needed due to .separator border size
color: var(--separator-text-color);
display: inline-block;
line-height: 2em;
padding: 0 1em;
position: relative;
z-index: 5;
}
}
&.chat-msg--retracted {
.chat-msg__message {
color: var(--subdued-color);
}
}
&.chat-info {
color: var(--chat-head-color);
font-size: var(--message-font-size);
line-height: var(--line-height-small);
2018-10-13 14:13:56 +02:00
font-size: 90%;
padding: 0.17rem 1rem;
&.badge {
color: var(--chat-head-text-color);
}
&.chat-state-notification {
font-style: italic;
}
&.chat-event {
clear: left;
font-style: italic;
}
&.chat-error {
2018-11-12 14:23:35 +01:00
color: var(--error-color);
font-weight: bold;
}
.q {
font-style: italic;
}
}
.chat-image {
height: auto;
width: auto;
max-height: 15em;
max-width: 100%;
}
2020-03-25 10:39:41 +01:00
&.chat-msg--action {
font-style: italic;
.chat-msg__author {
padding-right: 0.2em;
}
}
&.chat-msg {
display: inline-flex;
width: 100%;
flex-direction: row;
overflow: auto; // Ensures that content stays inside
padding: 0.125rem 1rem;
&.onload {
animation: colorchange-chatmessage 1s;
-webkit-animation: colorchange-chatmessage 1s;
}
&:hover {
background-color: rgba(0, 0, 0, 0.035);
.chat-msg__actions {
.chat-msg__action {
opacity: 1;
}
}
}
&.correcting {
&.groupchat {
background-color: var(--chatroom-correcting-color);
}
&:not(.groupchat) {
background-color: var(--chat-correcting-color);
}
}
.spoiler {
margin-top: 0.5em;
}
2018-04-26 19:10:06 +02:00
.spoiler-hint {
margin-bottom: 0.5em;
}
.spoiler-toggle {
2018-04-26 19:10:06 +02:00
color: white;
i {
color: white;
padding-right: 0.5em;
}
&:before {
padding-right: 0.25em;
whitespace: nowrap;
}
}
2018-07-20 15:54:59 +02:00
.chat-msg__content {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: stretch;
margin-left: 0.5rem;
width: calc(100% - var(--message-avatar-width));
}
.chat-msg__content--me {
.chat-msg__body--groupchat {
.chat-msg__text {
color: var(--subdued-color);
}
&.chat-msg__body--delayed .chat-msg__text,
&.chat-msg__body--received .chat-msg__text {
color: var(--message-text-color);
}
}
}
2018-07-20 15:54:59 +02:00
.chat-msg__content--action {
width: 100%;
2018-07-20 15:54:59 +02:00
margin-left: 0;
}
.chat-msg__body {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.chat-msg__message {
display: inline-flex;
flex-direction: column;
width: 100%;
overflow-wrap: break-word;
}
2018-07-20 15:54:59 +02:00
.chat-msg__edit-modal {
cursor: pointer;
2018-07-20 15:54:59 +02:00
padding-right: 0.5em;
}
&.headline {
.chat-msg__body {
margin-left: 0;
}
}
.chat-msg__subject {
font-weight: bold;
clear: right;
}
.chat-msg__text {
color: var(--message-text-color);
padding: 0;
width: 100%;
white-space: pre-wrap;
word-wrap: break-word;
word-break: break-word;
a {
word-wrap: break-word;
word-break: break-all;
display: inline-block;
2020-03-25 10:39:41 +01:00
&.chat-image__link {
display: block;
}
}
2018-09-03 13:24:37 +02:00
img {
&.emoji {
height: 1.5em;
width: 1.5em;
margin: 0 .05em 0 .1em;
vertical-align: -0.1em;
}
}
.emojione {
margin-bottom: -6px;
}
}
2019-01-31 15:26:19 +01:00
.chat-msg__text--larger {
font-size: 1.6em;
padding-top: 0.25em;
padding-bottom: 0.25em;
}
2018-07-20 15:54:59 +02:00
.chat-msg__media {
margin-top: 0.25rem;
2018-07-20 15:54:59 +02:00
word-break: break-all;
a {
word-wrap: break-word;
}
2018-04-27 17:59:41 +02:00
audio {
width: 100%;
}
}
.chat-msg__actions {
display: flex;
flex-wrap: nowrap;
.chat-msg__action {
height: var(--message-font-size);
font-size: var(--message-font-size);
padding: 0;
margin-left: 0.75em;
border: none;
opacity: 0;
background: transparent;
cursor: pointer;
&:focus {
opacity: 1;
}
}
}
.chat-msg__avatar {
margin-top: 0.5em;
vertical-align: middle;
height: var(--message-avatar-height);
width: var(--message-avatar-width);
min-height: var(--message-avatar-height);
min-width: var(--message-avatar-width);
}
.chat-msg__heading {
width: 100%;
margin-top: 0.5em;
padding-right: 0.25rem;
2018-04-26 19:10:06 +02:00
padding-bottom: 0.25rem;
.chat-msg__author {
overflow: hidden;
text-overflow: ellipsis;
2018-07-20 15:54:59 +02:00
white-space: nowrap;
font-family: var(--heading-font);
2018-05-14 13:27:10 +02:00
font-size: 115%;
2019-01-01 12:05:46 +01:00
font-weight: bold;
padding-bottom: 1px; // Hack to avoid cutting of text on the button
2019-01-28 13:39:33 +01:00
}
.badge {
margin-left: 0.5em;
font-family: var(--normal_font);
}
.chat-msg__time {
2018-04-27 17:59:41 +02:00
padding-left: 0.25em;
2019-02-13 18:22:47 +01:00
padding-right: 0.25em;
color: var(--text-color-lighten-15-percent);
}
}
&.chat-msg--action {
.chat-msg__content {
flex-wrap: wrap;
flex-direction: row;
justify-content: flex-start;
}
.chat-msg__text {
width: auto;
}
.chat-msg__heading {
margin-top: 0;
padding-bottom: 0;
width: auto;
2019-01-31 15:26:19 +01:00
.fa {
margin-left: 0.5em;
}
}
2018-07-20 15:54:59 +02:00
.chat-msg__author {
font-size: var(--message-font-size);
2018-07-20 15:54:59 +02:00
}
.chat-msg__time {
margin-left: 0;
}
}
&.chat-msg--followup {
.chat-msg__heading,
.chat-msg__avatar {
display: none;
}
.chat-msg__content {
margin-left: 2.75rem;
width: 100%;
}
}
.chat-msg__receipt {
2018-11-15 10:50:25 +01:00
margin-right: 0.5em;
color: var(--message-receipt-color);
}
}
}
.chatroom-body .message {
&.onload {
animation: colorchange-chatmessage-muc 1s;
-webkit-animation: colorchange-chatmessage-muc 1s;
}
.separator {
border-top: 0px;
border-bottom: var(--chatroom-separator-border-bottom);
}
}
}
#conversejs.converse-overlayed {
.message {
&.chat-msg {
&.chat-msg--followup {
.chat-msg__content {
margin-left: 0;
}
}
}
}
}
@media screen and (max-width: 767px) {
#conversejs:not(.converse-embedded) {
.message {
&.chat-msg {
.chat-msg__author {
white-space: normal;
}
}
}
}
}