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

Commit

Permalink
Fix emojis getting cropped in irc & bubble layouts by anti-zalgo (#7637)
Browse files Browse the repository at this point in the history
Co-authored-by: J. Ryan Stinnett <jryans@gmail.com>
  • Loading branch information
t3chguy and jryans committed Jan 27, 2022
1 parent 3ff4c68 commit 20819df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion res/css/views/rooms/_EventBubbleTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,15 @@ limitations under the License.
}

&:not(.mx_EventTile_noBubble) .mx_EventTile_line:not(.mx_EventTile_mediaLine) {
padding: var(--gutterSize);
// make the top and bottom padding 1px smaller so that we can pad .mx_EventTile_content by 1px
// to avoid anti-zalgo cutting off our larger than text emojis.
padding: calc(var(--gutterSize) - 1px);
padding-right: 60px; // space for the timestamp
background: var(--backgroundColor);

.mx_EventTile_content {
padding: 1px;
}
}

&.mx_EventTile_continuation[data-self=false] .mx_EventTile_line {
Expand Down
3 changes: 2 additions & 1 deletion res/css/views/rooms/_IRCLayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ $irc-line-height: $font-18px;
line-height: $irc-line-height !important;

.mx_EventTile {

// timestamps are links which shouldn't be underlined
> a {
text-decoration: none;
Expand Down Expand Up @@ -111,6 +110,8 @@ $irc-line-height: $font-18px;
.mx_TextualEvent,
.mx_MTextBody {
display: inline-block;
// add a 1px padding top and bottom because our larger emoji font otherwise gets cropped by anti-zalgo
padding: 1px 0;
}
}

Expand Down

0 comments on commit 20819df

Please sign in to comment.