Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
195 changes: 173 additions & 22 deletions app/theme/client/imports/components/messageBubble.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,114 @@
padding: 0 15px;

.message-body-wrapper {
overflow: hidden;

width: fit-content;
max-width: 75%;
margin-top: 2px;

border-radius: 20px;

font-family: 'Source Sans Pro', sans-serif;
font-weight: 400;

.body {
position: relative;

overflow: hidden;

width: 100%;
height: 100%;
padding: 11px 16px;

border-radius: 21px;
}

.reaction {
position: relative;

display: flex;

width: 100%;
height: 0;

transition: height 0.18s ease-out;
justify-content: flex-start;

> .reactions-container {
position: absolute;

display: flex;

width: 175px;

transition: width 0.1s ease-in-out, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
transform: translate(calc(12px - 100%), -16px) scale(0);

border-radius: 25px;

> .reaction-icon {
z-index: 2;

display: flex;

height: 25px;
padding: 4px;

transition: transform 0.18s ease-out, margin 0.1s ease-in-out;

border: 2px solid white;
border-radius: 25px;
background-color: var(--friendly-message-color);
align-items: center;
justify-content: center;

&:not(:first-of-type) {
transform: scale(0);
}

> .rc-icon {
flex: 1;

width: 13px;
height: 13px;

color: white;
}

> .reaction-count {
margin: 0 2px;

user-select: none;

color: white;

font-size: 12px;
}
}

> .reaction-more {
position: absolute;
z-index: 1;

width: 25px;
height: 25px;

transform: translate(3px, 1px);

border: 2px solid white;
border-radius: 25px;
background-color: var(--friendly-message-color);
}

&:hover,
&:active,
&:focus {
> .reaction-more {
display: none;
}

> .reaction-icon {
transform: scale(1);
}
}
}
}
}

Expand Down Expand Up @@ -258,27 +349,37 @@
&.messageSent {
align-items: flex-end;

.message-body-wrapper .body {
color: #ffffff;
.message-body-wrapper {
.body {
color: #ffffff;

* {
color: #ffffff !important;
* {
color: #ffffff;
}
background-color: var(--friendly-message-color);
}

.reaction {
> .reactions-container {
flex-direction: row-reverse;
}
}
background-color: var(--friendly-message-color);
}

&.firstMsg > .message-body-wrapper {
&.firstMsg {
margin-top: 10px;

border-bottom-right-radius: 6px;
> .message-body-wrapper .body {
border-bottom-right-radius: 6px;
}
}

&.midMsg > .message-body-wrapper {
&.midMsg > .message-body-wrapper .body {
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
}

&.lastMsg > .message-body-wrapper {
&.lastMsg > .message-body-wrapper .body {
border-top-right-radius: 6px;
}

Expand All @@ -294,31 +395,81 @@
&.messageReceived {
align-items: flex-start;

.message-body-wrapper .body {
color: #202e39;
background-color: #dee4e8;
.message-body-wrapper {
.body {
color: #202e39;

* {
color: #202e39;
}
background-color: #dee4e8;
}

.reaction {
justify-content: flex-end;

* {
color: #202e39 !important;
> .reactions-container {
flex-direction: row;

transform: translate(calc(100% - 12px), -16px) scale(0);

> .reaction-icon {
right: -6px;
left: unset;

background-color: #dee4e8;

> .rc-icon,
.reaction-count {
color: var(--friendly-message-color);
}
}

> .reaction-more {
transform: translate(-3px, 1px);

background-color: #ccd4da;
}
}
}
}

&.firstMsg > .message-body-wrapper {
&.firstMsg {
margin-top: 10px;

border-bottom-left-radius: 6px;
> .message-body-wrapper .body {
border-bottom-left-radius: 6px;
}
}

&.midMsg > .message-body-wrapper {
&.midMsg > .message-body-wrapper .body {
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
}

&.lastMsg > .message-body-wrapper {
&.lastMsg > .message-body-wrapper .body {
border-top-left-radius: 6px;
}
}

&.hasReactions {
.message-body-wrapper .reaction {
height: 8px;

> .reactions-container {
transform: translate(calc(12px - 100%), -16px) scale(1);
}
}

&.messageReceived {
.message-body-wrapper .reaction {
> .reactions-container {
transform: translate(calc(100% - 12px), -16px) scale(1);
}
}
}
}

&.bigEmoji {
.message-body-wrapper .body {
background-color: transparent !important;
Expand Down
99 changes: 99 additions & 0 deletions app/theme/client/imports/general/base_old.css
Original file line number Diff line number Diff line change
Expand Up @@ -1481,6 +1481,105 @@

word-wrap: break-word;
-webkit-overflow-scrolling: touch;

> ul {
> li {
transition: opacity 0.15s ease-out;
}

> .reactions-backdrop {
position: fixed;
top: 0;
left: 0;

display: none;

width: 100%;
height: 100%;
}

> .reactions {
--reactionSize: 45px;

position: absolute;

display: flex;
overflow: hidden;

box-sizing: content-box;

height: var(--reactionSize);
padding: 6px 15px;

transition: transform 0.15s ease-out, opacity 0.15s linear;
transform: translateY(30px) scale(0.6);

pointer-events: none;

opacity: 0;
border-radius: var(--reactionSize);
background-color: white;
box-shadow: 0 0 5px 0 #cccccc;
gap: 6px;

> .reaction-icon {
width: var(--reactionSize);
height: var(--reactionSize);
padding: 10px;

border-radius: 50%;

> .rc-icon {
width: 100%;
height: 100%;

pointer-events: none;

color: var(--friendly-message-color);
}

@media (hover: hover) {
&:hover {
background-color: var(--friendly-message-color);

> .rc-icon {
color: #ffffff;
}
}
}

&:active {
background-color: var(--friendly-message-color);

> .rc-icon {
color: #ffffff;
}
}
}
}
}

&.show-reactions {
> ul {
> li {
pointer-events: none;

opacity: 0.35;
}

> .reactions-backdrop {
display: unset;
}

> .reactions {
transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.18s linear;
transform: translateY(0) scale(1);
pointer-events: all;

opacity: 1;
}
}
}
}

& .footer {
Expand Down
Loading