Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Move mx_MessageTimestamp out of mx_EventTile:not([data-layout=bubble]) #8976

Merged
merged 12 commits into from
Jul 6, 2022
Merged
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
2 changes: 1 addition & 1 deletion res/css/structures/_FilePanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ limitations under the License.

.mx_MessageTimestamp {
flex: 1 0 0;
text-align: right; // FIXME: .mx_EventTile:not([data-layout=bubble]) .mx_MessageTimestamp
text-align: right;
visibility: visible;
position: initial;
font-size: $font-14px;
Expand Down
3 changes: 3 additions & 0 deletions res/css/views/dialogs/_MessageEditHistoryDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ limitations under the License.
text-decoration: underline;
}

// Emulate mx_EventTile[data-layout=group]
.mx_EventTile {
padding-top: 0 !important; // Override mx_EventTile:not([data-layout=bubble])

.mx_MessageTimestamp {
position: absolute;
left: 0;
text-align: center;
}

.mx_EventTile_line {
Expand Down
36 changes: 21 additions & 15 deletions res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,18 @@ $left-gutter: 64px;
}
}

&[data-layout=irc] {
.mx_MessageTimestamp {
text-align: right;
}
}

&[data-layout=group] {
.mx_EventTile_avatar {
top: 14px;
left: $spacing-8;
}

.mx_MessageTimestamp {
position: absolute; // for modern layout
}

.mx_EventTile_line,
.mx_EventTile_reply {
padding-top: var(--EventTile_group_line-spacing-block-start);
Expand All @@ -223,6 +225,12 @@ $left-gutter: 64px;
margin-right: 10px;
}

.mx_MessageTimestamp {
position: absolute;
left: 0;
text-align: center;
}

.mx_ThreadSummary,
.mx_ThreadSummary_icon {
margin-left: $left-gutter;
Expand Down Expand Up @@ -289,11 +297,6 @@ $left-gutter: 64px;
}
}

.mx_MessageTimestamp {
left: 0px;
text-align: center;
}

/* this is used for the tile for the event which is selected via the URL.
* TODO: ultimately we probably want some transition on here.
*/
Expand Down Expand Up @@ -926,11 +929,14 @@ $left-gutter: 64px;
}
}

&:not([data-layout=bubble]) {
&[data-layout=irc],
&[data-layout=group] {
.mx_MessageTimestamp {
top: 2px; // Align with avatar
}
}

&:not([data-layout=bubble]) {
.mx_EventTile_avatar {
left: calc($MessageTimestamp_width + 14px - 4px); // 14px: avatar width, 4px: align with text
z-index: 9; // position above the hover styling
Expand Down Expand Up @@ -1036,11 +1042,6 @@ $left-gutter: 64px;
}
}

.mx_MessageTimestamp {
top: 2px; // Align with mx_EventTile_content
position: absolute; // for IRC layout
}

.mx_EventTile_senderDetails {
display: flex;
align-items: center;
Expand All @@ -1060,6 +1061,11 @@ $left-gutter: 64px;
}
}
}

.mx_MessageTimestamp {
position: absolute; // for IRC layout
top: 2px; // Align with mx_EventTile_content
}
}
}

Expand Down
4 changes: 0 additions & 4 deletions res/css/views/rooms/_IRCLayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ $irc-line-height: $font-18px;
}
}

.mx_MessageTimestamp {
text-align: right;
}

.mx_EventTile_e2eIcon {
padding: 0;

Expand Down