Skip to content

Commit 49524b8

Browse files
silverwindwxiaoguang
authored andcommitted
Simplify emoji rendering (go-gitea#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: go-gitea#34019 Also see go-gitea#11541 and go-gitea#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 b351676 commit 49524b8

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

web_src/css/base.css

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,14 +1225,7 @@ table th[data-sortt-desc] .svg {
12251225
box-shadow: 0 0 0 1px var(--color-secondary) inset;
12261226
}
12271227

1228-
.emoji {
1229-
font-size: 1.25em;
1230-
line-height: var(--line-height-default);
1231-
font-style: normal !important;
1232-
font-weight: var(--font-weight-normal) !important;
1233-
vertical-align: -0.075em;
1234-
}
1235-
1228+
/* for "image" emojis like ":git:" ":gitea:" and ":github:" (see CUSTOM_EMOJIS config option) */
12361229
.emoji img {
12371230
border-width: 0 !important;
12381231
margin: 0 !important;

web_src/css/markup/content.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,6 @@
337337
padding-right: 28px;
338338
}
339339

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

0 commit comments

Comments
 (0)