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

Commit ed086b0

Browse files
authored
Set line-height: 1 to RedactedBody inside GenericEventListSummary for IRC/modern layout (#8529)
* Move line-height of .mx_EventTile_line from _GroupLayout.scss to _EventTile.scss Specifying mx_EventTile_line's line-height in mx_GroupLayout is too strong for mx_GenericEventListSummary. - Set line-height:1 to mx_RedactedBody inside mx_GenericEventListSummary on IRC/modern layout Signed-off-by: Suguru Hirahara <[email protected]> * Use a variable to remove the comment Signed-off-by: Suguru Hirahara <[email protected]> * Readability Signed-off-by: Suguru Hirahara <[email protected]>
1 parent b1daf3f commit ed086b0

File tree

2 files changed

+36
-8
lines changed

2 files changed

+36
-8
lines changed

res/css/views/rooms/_EventTile.scss

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
5050
.mx_EventTile_receiptSending::before {
5151
mask-image: url('$(res)/img/element-icons/circle-sending.svg');
5252
}
53+
54+
&[data-layout=group] {
55+
.mx_EventTile_line {
56+
line-height: var(--GroupLayout-EventTile-line-height);
57+
}
58+
}
5359
}
5460

5561
.mx_EventTile:not([data-layout=bubble]) {
@@ -263,8 +269,15 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
263269
}
264270
}
265271

266-
.mx_GenericEventListSummary:not([data-layout=bubble]) .mx_EventTile_line {
267-
padding-left: $left-gutter;
272+
.mx_GenericEventListSummary:not([data-layout=bubble]) {
273+
.mx_EventTile_line {
274+
padding-left: $left-gutter;
275+
line-height: normal;
276+
277+
.mx_RedactedBody {
278+
line-height: 1; // remove spacing between lines
279+
}
280+
}
268281
}
269282

270283
.mx_EventTile:not([data-layout=bubble]).mx_EventTile_info .mx_EventTile_line,

res/css/views/rooms/_GroupLayout.scss

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ limitations under the License.
1818
$left-gutter: 64px;
1919

2020
.mx_GroupLayout {
21+
--GroupLayout-EventTile-line-height: $font-22px;
22+
2123
.mx_EventTile {
2224
> .mx_DisambiguatedProfile {
2325
line-height: $font-20px;
@@ -33,10 +35,14 @@ $left-gutter: 64px;
3335
position: absolute; // for modern layout
3436
}
3537

36-
.mx_EventTile_line, .mx_EventTile_reply {
38+
.mx_EventTile_line,
39+
.mx_EventTile_reply {
3740
padding-top: 1px;
3841
padding-bottom: 3px;
39-
line-height: $font-22px;
42+
}
43+
44+
.mx_EventTile_reply {
45+
line-height: var(--GroupLayout-EventTile-line-height);
4046
}
4147
}
4248
}
@@ -47,7 +53,8 @@ $left-gutter: 64px;
4753
.mx_EventTile {
4854
padding-top: 4px;
4955

50-
.mx_EventTile_line, .mx_EventTile_reply {
56+
.mx_EventTile_line,
57+
.mx_EventTile_reply {
5158
padding-top: 0;
5259
padding-bottom: 0;
5360
}
@@ -56,9 +63,12 @@ $left-gutter: 64px;
5663
// same as the padding for non-compact .mx_EventTile.mx_EventTile_info
5764
padding-top: 0px;
5865
font-size: $font-13px;
59-
.mx_EventTile_line, .mx_EventTile_reply {
66+
67+
.mx_EventTile_line,
68+
.mx_EventTile_reply {
6069
line-height: $font-20px;
6170
}
71+
6272
.mx_EventTile_avatar {
6373
top: 4px;
6474
}
@@ -71,18 +81,23 @@ $left-gutter: 64px;
7181
&.mx_EventTile_emote {
7282
// add a bit more space for emotes so that avatars don't collide
7383
padding-top: 8px;
84+
7485
.mx_EventTile_avatar {
7586
top: 2px;
7687
}
77-
.mx_EventTile_line, .mx_EventTile_reply {
88+
89+
.mx_EventTile_line,
90+
.mx_EventTile_reply {
7891
padding-top: 0px;
7992
padding-bottom: 1px;
8093
}
8194
}
8295

8396
&.mx_EventTile_emote.mx_EventTile_continuation {
8497
padding-top: 0;
85-
.mx_EventTile_line, .mx_EventTile_reply {
98+
99+
.mx_EventTile_line,
100+
.mx_EventTile_reply {
86101
padding-top: 0px;
87102
padding-bottom: 0px;
88103
}

0 commit comments

Comments
 (0)