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

Commit c4460d8

Browse files
authored
Move EventTile style rules of compact modern layout, enabling it on the right panel as well (#8766)
1 parent ef48443 commit c4460d8

File tree

4 files changed

+88
-99
lines changed

4 files changed

+88
-99
lines changed

res/css/_components.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@
241241
@import "./views/rooms/_EntityTile.scss";
242242
@import "./views/rooms/_EventBubbleTile.scss";
243243
@import "./views/rooms/_EventTile.scss";
244-
@import "./views/rooms/_GroupLayout.scss";
245244
@import "./views/rooms/_HistoryTile.scss";
246245
@import "./views/rooms/_IRCLayout.scss";
247246
@import "./views/rooms/_JumpToBottomButton.scss";

res/css/structures/_RoomView.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,10 @@ hr.mx_RoomView_myReadMarker {
278278
.mx_MatrixChat_useCompactLayout {
279279
.mx_RoomView_MessageList {
280280
margin-bottom: 4px;
281+
282+
h2 {
283+
margin-top: 6px; // TODO: Use a spacing variable
284+
}
281285
}
282286

283287
.mx_RoomView_statusAreaBox {

res/css/views/rooms/_EventTile.scss

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,6 +1069,90 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
10691069
}
10701070
}
10711071

1072+
// Cascading - compact modern layout on the main timeline and the right panel
1073+
.mx_MatrixChat_useCompactLayout {
1074+
.mx_EventTile {
1075+
// Override :not([data-layout="bubble"])
1076+
&[data-layout=group] {
1077+
padding-top: $spacing-4;
1078+
1079+
&.mx_EventTile_info {
1080+
padding-top: 0; // same as the padding for non-compact .mx_EventTile.mx_EventTile_info
1081+
font-size: $font-13px;
1082+
1083+
.mx_EventTile_avatar {
1084+
top: $spacing-4;
1085+
}
1086+
1087+
.mx_EventTile_line,
1088+
.mx_EventTile_reply {
1089+
line-height: $font-20px;
1090+
}
1091+
}
1092+
1093+
&.mx_EventTile_emote {
1094+
padding-top: $spacing-8; // add a bit more space for emotes so that avatars don't collide
1095+
1096+
&.mx_EventTile_continuation {
1097+
padding-top: 0;
1098+
1099+
.mx_EventTile_line,
1100+
.mx_EventTile_reply {
1101+
padding-top: 0;
1102+
padding-bottom: 0;
1103+
}
1104+
}
1105+
1106+
.mx_EventTile_avatar {
1107+
top: 2px;
1108+
}
1109+
1110+
.mx_EventTile_line,
1111+
.mx_EventTile_reply {
1112+
padding-top: 0;
1113+
padding-bottom: 1px;
1114+
}
1115+
}
1116+
1117+
.mx_EventTile_avatar {
1118+
top: 2px;
1119+
}
1120+
1121+
.mx_EventTile_line,
1122+
.mx_EventTile_reply {
1123+
padding-top: 0;
1124+
padding-bottom: 0;
1125+
}
1126+
1127+
.mx_EventTile_e2eIcon {
1128+
top: 3px;
1129+
}
1130+
1131+
.mx_DisambiguatedProfile {
1132+
font-size: $font-13px;
1133+
}
1134+
1135+
.mx_ReadReceiptGroup {
1136+
// This aligns the avatar with the last line of the
1137+
// message. We want to move it one line up - 2rem
1138+
top: -2rem;
1139+
}
1140+
1141+
.mx_EventTile_content .markdown-body {
1142+
p,
1143+
ul,
1144+
ol,
1145+
dl,
1146+
blockquote,
1147+
pre,
1148+
table {
1149+
margin-bottom: $spacing-4; // 1/4 of the non-compact margin-bottom
1150+
}
1151+
}
1152+
}
1153+
}
1154+
}
1155+
10721156
// Media query for mobile UI
10731157
@media only screen and (max-width: 480px) {
10741158
.mx_EventTile_content {

res/css/views/rooms/_GroupLayout.scss

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)