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

Set line-height: 1 to RedactedBody inside GenericEventListSummary for IRC/modern layout #8529

Merged
merged 3 commits into from
May 9, 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
17 changes: 15 additions & 2 deletions res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
.mx_EventTile_receiptSending::before {
mask-image: url('$(res)/img/element-icons/circle-sending.svg');
}

&[data-layout=group] {
.mx_EventTile_line {
line-height: var(--GroupLayout-EventTile-line-height);
}
}
}

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

.mx_GenericEventListSummary:not([data-layout=bubble]) .mx_EventTile_line {
padding-left: $left-gutter;
.mx_GenericEventListSummary:not([data-layout=bubble]) {
.mx_EventTile_line {
padding-left: $left-gutter;
line-height: normal;

.mx_RedactedBody {
line-height: 1; // remove spacing between lines
}
}
}

.mx_EventTile:not([data-layout=bubble]).mx_EventTile_info .mx_EventTile_line,
Expand Down
27 changes: 21 additions & 6 deletions res/css/views/rooms/_GroupLayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ limitations under the License.
$left-gutter: 64px;

.mx_GroupLayout {
--GroupLayout-EventTile-line-height: $font-22px;

.mx_EventTile {
> .mx_DisambiguatedProfile {
line-height: $font-20px;
Expand All @@ -33,10 +35,14 @@ $left-gutter: 64px;
position: absolute; // for modern layout
}

.mx_EventTile_line, .mx_EventTile_reply {
.mx_EventTile_line,
.mx_EventTile_reply {
padding-top: 1px;
padding-bottom: 3px;
line-height: $font-22px;
}

.mx_EventTile_reply {
line-height: var(--GroupLayout-EventTile-line-height);
}
}
}
Expand All @@ -47,7 +53,8 @@ $left-gutter: 64px;
.mx_EventTile {
padding-top: 4px;

.mx_EventTile_line, .mx_EventTile_reply {
.mx_EventTile_line,
.mx_EventTile_reply {
padding-top: 0;
padding-bottom: 0;
}
Expand All @@ -56,9 +63,12 @@ $left-gutter: 64px;
// same as the padding for non-compact .mx_EventTile.mx_EventTile_info
padding-top: 0px;
font-size: $font-13px;
.mx_EventTile_line, .mx_EventTile_reply {

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

.mx_EventTile_avatar {
top: 4px;
}
Expand All @@ -71,18 +81,23 @@ $left-gutter: 64px;
&.mx_EventTile_emote {
// add a bit more space for emotes so that avatars don't collide
padding-top: 8px;

.mx_EventTile_avatar {
top: 2px;
}
.mx_EventTile_line, .mx_EventTile_reply {

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

&.mx_EventTile_emote.mx_EventTile_continuation {
padding-top: 0;
.mx_EventTile_line, .mx_EventTile_reply {

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