Skip to content

Instantly share code, notes, and snippets.

@ice6
Last active April 18, 2024 08:57
Show Gist options
  • Save ice6/b1977b11e68686974d737ea082ec278b to your computer and use it in GitHub Desktop.
Save ice6/b1977b11e68686974d737ea082ec278b to your computer and use it in GitHub Desktop.
Different color and alignment for sent versus received messages (Chat Bubbles UX)
.messages-box ul {
background-color: #F5F5F2;
}
.message {
display: flex;
}
.message:hover {
background-color:transparent;
}
.message .message-body-wrapper {
margin-right: 10px;
max-width: 70%;
}
.message.own {
flex-direction: row-reverse;
}
.message.own .thumb {
left: auto;
right: 16px;
}
.message.own .message-body-wrapper .title {
flex-direction: row-reverse;
}
.message .message-body-wrapper .body {
background-color: #fff;
padding: 6px;
border: 1px solid #E7E7E5;
border-radius: 1px;
}
.message .message-body-wrapper .body:hover {
background-color: #F6F6F3;
}
.message.own .message-body-wrapper .body {
background-color: #60E171;
}
.message.system.uj {
justify-content: center;
}
.message.system.uj .thumb {
visibility: hidden;
}
.message .message-body-wrapper .title .message-alias {
display: none;
}
@ZsiGiT
Copy link

ZsiGiT commented Apr 18, 2024

Hello!

Would it be possible to make it work from version >6.7.*?

I would really like to have a skype/messenger/viber style chat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment