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

Commit 20819df

Browse files
t3chguyjryans
andauthored
Fix emojis getting cropped in irc & bubble layouts by anti-zalgo (#7637)
Co-authored-by: J. Ryan Stinnett <[email protected]>
1 parent 3ff4c68 commit 20819df

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

res/css/views/rooms/_EventBubbleTile.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,15 @@ limitations under the License.
279279
}
280280

281281
&:not(.mx_EventTile_noBubble) .mx_EventTile_line:not(.mx_EventTile_mediaLine) {
282-
padding: var(--gutterSize);
282+
// make the top and bottom padding 1px smaller so that we can pad .mx_EventTile_content by 1px
283+
// to avoid anti-zalgo cutting off our larger than text emojis.
284+
padding: calc(var(--gutterSize) - 1px);
283285
padding-right: 60px; // space for the timestamp
284286
background: var(--backgroundColor);
287+
288+
.mx_EventTile_content {
289+
padding: 1px;
290+
}
285291
}
286292

287293
&.mx_EventTile_continuation[data-self=false] .mx_EventTile_line {

res/css/views/rooms/_IRCLayout.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ $irc-line-height: $font-18px;
2525
line-height: $irc-line-height !important;
2626

2727
.mx_EventTile {
28-
2928
// timestamps are links which shouldn't be underlined
3029
> a {
3130
text-decoration: none;
@@ -111,6 +110,8 @@ $irc-line-height: $font-18px;
111110
.mx_TextualEvent,
112111
.mx_MTextBody {
113112
display: inline-block;
113+
// add a 1px padding top and bottom because our larger emoji font otherwise gets cropped by anti-zalgo
114+
padding: 1px 0;
114115
}
115116
}
116117

0 commit comments

Comments
 (0)