Skip to content

Commit 58d0a3f

Browse files
Simplify emoji rendering (#34048)
It seems like most of our custom styles around the .emoji class are useless and we can just make them render like any other text. Rendering should now match GitHub. Fixes: #34019 Also see #11541 and #12317 for some context. I think browser emoji rendering has improved in recent years so these hacks are no longer needed. --------- Co-authored-by: wxiaoguang <[email protected]>
1 parent b542769 commit 58d0a3f

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

web_src/css/base.css

+1-8
Original file line numberDiff line numberDiff line change
@@ -989,14 +989,7 @@ table th[data-sortt-desc] .svg {
989989
box-shadow: 0 0 0 1px var(--color-secondary) inset;
990990
}
991991

992-
.emoji {
993-
font-size: 1.25em;
994-
line-height: var(--line-height-default);
995-
font-style: normal !important;
996-
font-weight: var(--font-weight-normal) !important;
997-
vertical-align: -0.075em;
998-
}
999-
992+
/* for "image" emojis like ":git:" ":gitea:" and ":github:" (see CUSTOM_EMOJIS config option) */
1000993
.emoji img {
1001994
border-width: 0 !important;
1002995
margin: 0 !important;

web_src/css/markup/content.css

-5
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,6 @@
336336
padding-right: 28px;
337337
}
338338

339-
.markup .emoji {
340-
max-width: none;
341-
vertical-align: text-top;
342-
}
343-
344339
.markup span.frame {
345340
display: block;
346341
overflow: hidden;

0 commit comments

Comments
 (0)