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

Commit 81c894f

Browse files
authored
Stop using mx_GroupLayout for styling (#8711)
1 parent f9100d5 commit 81c894f

File tree

4 files changed

+28
-59
lines changed

4 files changed

+28
-59
lines changed

res/css/views/right_panel/_ThreadPanel.scss

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -116,29 +116,11 @@ limitations under the License.
116116
height: 100%;
117117
}
118118

119-
// Override _GroupLayout.scss for the thread panel
120-
.mx_GroupLayout {
121-
.mx_EventTile {
122-
.mx_MessageActionBar {
123-
right: 0;
124-
top: -36px; // 2px above EventTile
125-
z-index: 10; // See _EventTile.scss
126-
}
127-
128-
&[data-shape=ThreadsList] {
129-
> .mx_DisambiguatedProfile {
130-
margin-inline-start: 0;
131-
}
132-
133-
.mx_MessageTimestamp {
134-
position: initial;
135-
width: auto;
136-
}
137-
138-
.mx_EventTile_line {
139-
padding-bottom: 0; // Override mx_EventTile_line on _GroupLayout.scss
140-
}
141-
}
119+
.mx_EventTile[data-layout=group] {
120+
.mx_MessageActionBar {
121+
right: 0;
122+
top: -36px; // 2px above EventTile
123+
z-index: 10; // See _EventTile.scss
142124
}
143125
}
144126

res/css/views/rooms/_EventTile.scss

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,25 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
6666
}
6767

6868
&[data-layout=group] {
69-
.mx_EventTile_line {
70-
line-height: var(--GroupLayout-EventTile-line-height);
69+
> .mx_DisambiguatedProfile {
70+
line-height: $font-20px;
71+
margin-left: $left-gutter;
72+
}
73+
74+
> .mx_EventTile_avatar {
75+
position: absolute;
76+
z-index: 9;
77+
}
78+
79+
.mx_MessageTimestamp {
80+
position: absolute; // for modern layout
81+
}
82+
83+
.mx_EventTile_line,
84+
.mx_EventTile_reply {
85+
padding-top: 1px;
86+
padding-bottom: 3px;
87+
line-height: $font-22px;
7188
}
7289
}
7390
}
@@ -128,7 +145,6 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
128145
display: inline-block;
129146
padding-bottom: 0px;
130147
padding-top: 0px;
131-
margin: 0px;
132148
max-width: calc(100% - $left-gutter);
133149
}
134150

@@ -789,7 +805,7 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
789805
}
790806

791807
.mx_DisambiguatedProfile {
792-
margin-right: $spacing-12;
808+
margin-inline: 0 $spacing-12;
793809
display: inline-flex;
794810
flex: 1;
795811

@@ -813,6 +829,7 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
813829
.mx_EventTile_line {
814830
width: 100%;
815831
box-sizing: border-box;
832+
padding-bottom: 0;
816833

817834
.mx_ThreadPanel_replies {
818835
margin-top: $spacing-8;
@@ -835,6 +852,7 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
835852
.mx_MessageTimestamp {
836853
max-width: 80px;
837854
width: auto;
855+
position: initial;
838856
}
839857
}
840858

res/css/views/rooms/_GroupLayout.scss

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,6 @@ See the License for the specific language governing permissions and
1515
limitations under the License.
1616
*/
1717

18-
$left-gutter: 64px;
19-
20-
.mx_GroupLayout {
21-
--GroupLayout-EventTile-line-height: $font-22px;
22-
23-
.mx_EventTile {
24-
> .mx_DisambiguatedProfile {
25-
line-height: $font-20px;
26-
margin-left: $left-gutter;
27-
}
28-
29-
> .mx_EventTile_avatar {
30-
position: absolute;
31-
z-index: 9;
32-
}
33-
34-
.mx_MessageTimestamp {
35-
position: absolute; // for modern layout
36-
}
37-
38-
.mx_EventTile_line,
39-
.mx_EventTile_reply {
40-
padding-top: 1px;
41-
padding-bottom: 3px;
42-
}
43-
44-
.mx_EventTile_reply {
45-
line-height: var(--GroupLayout-EventTile-line-height);
46-
}
47-
}
48-
}
49-
5018
/* Compact layout overrides */
5119

5220
.mx_MatrixChat_useCompactLayout {

res/css/views/rooms/_IRCLayout.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ $irc-line-height: $font-18px;
173173

174174
.mx_DisambiguatedProfile {
175175
width: var(--name-width);
176+
margin-inline-end: 0; // override mx_EventTile > *
176177
display: flex;
177178
order: 2;
178179
flex-shrink: 0;

0 commit comments

Comments
 (0)