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

Commit

Permalink
Set line-height for ReplyTile on IRC, modern, and bubble layout
Browse files Browse the repository at this point in the history
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
  • Loading branch information
luixxiul committed Jun 29, 2022
1 parent 4486509 commit d3146ab
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
7 changes: 6 additions & 1 deletion res/css/views/rooms/_EventBubbleTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ limitations under the License.
.mx_EventTile[data-layout=bubble] {
--EventTile_bubble-margin-inline-start: 49px;
--EventTile_bubble-margin-inline-end: 60px;
--EventTile_bubble_line-line-height: $font-18px; // fixed line height to prevent emoji from being taller than text
--EventTile_bubble_line-margin-inline-start: -9px;
--EventTile_bubble_line-margin-inline-end: -12px;
--EventTile_bubble_gap-inline: 5px;
Expand Down Expand Up @@ -121,7 +122,7 @@ limitations under the License.

width: fit-content;
max-width: var(--EventBubbleTile_line-max-width); // Align message bubble and displayName
line-height: $font-18px; // fixed line height to prevent emoji from being taller than text
line-height: var(--EventTile_bubble_line-line-height);
}

// other users profile on bubble layout
Expand Down Expand Up @@ -153,6 +154,10 @@ limitations under the License.
font-size: $font-15px;
}

.mx_ReplyTile .mx_EventTile_content {
line-height: var(--EventTile_bubble_line-line-height);
}

.mx_MessageActionBar {
top: -28px;
z-index: 9; // above the avatar
Expand Down
8 changes: 7 additions & 1 deletion res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
}

&[data-layout=group] {
--EventTile_group_line-line-height: $font-22px;

> .mx_DisambiguatedProfile {
line-height: $font-20px;
margin-left: $left-gutter;
Expand All @@ -124,7 +126,7 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
padding-top: 1px;
padding-bottom: 3px;
padding-left: $left-gutter;
line-height: $font-22px;
line-height: var(--EventTile_group_line-line-height);
}

.mx_EventTile_e2eIcon {
Expand All @@ -135,6 +137,10 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
margin-right: 10px;
}

.mx_ReplyTile .mx_EventTile_content {
line-height: var(--EventTile_group_line-line-height);
}

.mx_ThreadSummary,
.mx_ThreadSummaryIcon {
margin-left: $left-gutter;
Expand Down
4 changes: 4 additions & 0 deletions res/css/views/rooms/_IRCLayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ $irc-line-height: $font-18px;
order: 4;
}

.mx_ReplyTile .mx_EventTile_content {
line-height: $irc-line-height;
}

.mx_EditMessageComposer_buttons {
position: relative;
}
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/rooms/_ReplyTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ limitations under the License.
// We do reply size limiting with CSS to avoid duplicating the TextualBody component.
.mx_EventTile_content {
$reply-lines: 2;
$line-height: $font-22px;
$line-height: $font-22px; // Same as var(--EventTile_group_line-line-height)

text-overflow: ellipsis;
display: -webkit-box;
Expand Down

0 comments on commit d3146ab

Please sign in to comment.