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

Commit

Permalink
Move EventTile style rules of compact modern layout, enabling it on t…
Browse files Browse the repository at this point in the history
…he right panel as well (#8766)
  • Loading branch information
luixxiul committed Jun 18, 2022
1 parent ef48443 commit c4460d8
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 99 deletions.
1 change: 0 additions & 1 deletion res/css/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@
@import "./views/rooms/_EntityTile.scss";
@import "./views/rooms/_EventBubbleTile.scss";
@import "./views/rooms/_EventTile.scss";
@import "./views/rooms/_GroupLayout.scss";
@import "./views/rooms/_HistoryTile.scss";
@import "./views/rooms/_IRCLayout.scss";
@import "./views/rooms/_JumpToBottomButton.scss";
Expand Down
4 changes: 4 additions & 0 deletions res/css/structures/_RoomView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ hr.mx_RoomView_myReadMarker {
.mx_MatrixChat_useCompactLayout {
.mx_RoomView_MessageList {
margin-bottom: 4px;

h2 {
margin-top: 6px; // TODO: Use a spacing variable
}
}

.mx_RoomView_statusAreaBox {
Expand Down
84 changes: 84 additions & 0 deletions res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,90 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
}
}

// Cascading - compact modern layout on the main timeline and the right panel
.mx_MatrixChat_useCompactLayout {
.mx_EventTile {
// Override :not([data-layout="bubble"])
&[data-layout=group] {
padding-top: $spacing-4;

&.mx_EventTile_info {
padding-top: 0; // same as the padding for non-compact .mx_EventTile.mx_EventTile_info
font-size: $font-13px;

.mx_EventTile_avatar {
top: $spacing-4;
}

.mx_EventTile_line,
.mx_EventTile_reply {
line-height: $font-20px;
}
}

&.mx_EventTile_emote {
padding-top: $spacing-8; // add a bit more space for emotes so that avatars don't collide

&.mx_EventTile_continuation {
padding-top: 0;

.mx_EventTile_line,
.mx_EventTile_reply {
padding-top: 0;
padding-bottom: 0;
}
}

.mx_EventTile_avatar {
top: 2px;
}

.mx_EventTile_line,
.mx_EventTile_reply {
padding-top: 0;
padding-bottom: 1px;
}
}

.mx_EventTile_avatar {
top: 2px;
}

.mx_EventTile_line,
.mx_EventTile_reply {
padding-top: 0;
padding-bottom: 0;
}

.mx_EventTile_e2eIcon {
top: 3px;
}

.mx_DisambiguatedProfile {
font-size: $font-13px;
}

.mx_ReadReceiptGroup {
// This aligns the avatar with the last line of the
// message. We want to move it one line up - 2rem
top: -2rem;
}

.mx_EventTile_content .markdown-body {
p,
ul,
ol,
dl,
blockquote,
pre,
table {
margin-bottom: $spacing-4; // 1/4 of the non-compact margin-bottom
}
}
}
}
}

// Media query for mobile UI
@media only screen and (max-width: 480px) {
.mx_EventTile_content {
Expand Down
98 changes: 0 additions & 98 deletions res/css/views/rooms/_GroupLayout.scss

This file was deleted.

0 comments on commit c4460d8

Please sign in to comment.