Skip to content

Commit

Permalink
add breakpoints for timestamp width
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Gira committed Sep 27, 2022
1 parent f3b8435 commit b49fb48
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
8 changes: 7 additions & 1 deletion src/style/common/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,13 @@ body {

@conversation-message-max-width: 640px;
@conversation-message-sender-width: 56px;
@conversation-message-timestamp-width: 170px;

body {
--conversation-message-timestamp-width: 170px;
@media (max-width: @screen-lg-min) {
--conversation-message-timestamp-width: 55px;
}
}

// ----------------------------------------------------------------------------
// Conversation Input
Expand Down
6 changes: 4 additions & 2 deletions src/style/content/conversation/input-bar.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
.reset-textarea;

width: 100%;
max-width: @conversation-max-width - @conversation-message-sender-width - @conversation-message-timestamp-width;
max-width: calc(
@conversation-max-width - @conversation-message-sender-width - var(--conversation-message-timestamp-width)
);
height: @conversation-input-line-height;
min-height: @conversation-input-line-height;
max-height: @conversation-input-max-height;
Expand Down Expand Up @@ -122,7 +124,7 @@
.list-unstyled;

display: flex;
min-width: @conversation-message-timestamp-width;
min-width: var(--conversation-message-timestamp-width);
align-items: center;
justify-content: flex-end;
margin: 0;
Expand Down
10 changes: 5 additions & 5 deletions src/style/content/conversation/message-list.less
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
}

.message-header-line {
min-width: @conversation-message-timestamp-width;
min-width: var(--conversation-message-timestamp-width);
height: 1px;
flex: 1;
border: none;
Expand Down Expand Up @@ -287,7 +287,7 @@

&:not(.message-timestamp-day) {
border: 0;
margin-right: @conversation-message-timestamp-width;
margin-right: var(--conversation-message-timestamp-width);

.message-header-label {
border-bottom: 1px dotted @separator-color;
Expand All @@ -314,7 +314,7 @@
// MESSAGE - BODY
.message-body {
position: relative;
padding-right: @conversation-message-timestamp-width;
padding-right: var(--conversation-message-timestamp-width);
padding-left: @conversation-message-sender-width;
margin-top: -5px;

Expand Down Expand Up @@ -467,7 +467,7 @@
width: 100%;
flex-wrap: wrap;
margin-top: 4px;
margin-right: @conversation-message-timestamp-width;
margin-right: var(--conversation-message-timestamp-width);
margin-left: @conversation-message-sender-width;

> *:not(:last-child) {
Expand Down Expand Up @@ -504,7 +504,7 @@
top: 0;
right: 0;
display: flex;
width: @conversation-message-timestamp-width;
width: var(--conversation-message-timestamp-width);
height: @line-height-lg;
align-items: center;

Expand Down
2 changes: 1 addition & 1 deletion src/style/content/conversation/message-quote.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.message-quote {
position: relative;
padding-right: @conversation-message-timestamp-width;
padding-right: var(--conversation-message-timestamp-width);
padding-left: @conversation-message-sender-width + 16;
margin-bottom: 10px;
font-size: 14px;
Expand Down

0 comments on commit b49fb48

Please sign in to comment.