From 2aa8305cd0584ecd4bf58da92afdb3260e5e3d1c Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 28 Mar 2025 10:00:00 +0100 Subject: [PATCH 1/3] Simplify emoji rendering 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. Fixes: https://github.com/go-gitea/gitea/issues/34019 --- web_src/css/base.css | 8 -------- web_src/css/markup/content.css | 1 - 2 files changed, 9 deletions(-) diff --git a/web_src/css/base.css b/web_src/css/base.css index b3ad02696acc3..8429f6f575959 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -989,14 +989,6 @@ table th[data-sortt-desc] .svg { box-shadow: 0 0 0 1px var(--color-secondary) inset; } -.emoji { - font-size: 1.25em; - line-height: var(--line-height-default); - font-style: normal !important; - font-weight: var(--font-weight-normal) !important; - vertical-align: -0.075em; -} - .emoji img { border-width: 0 !important; margin: 0 !important; diff --git a/web_src/css/markup/content.css b/web_src/css/markup/content.css index 865ac0536afa9..d379f62143da5 100644 --- a/web_src/css/markup/content.css +++ b/web_src/css/markup/content.css @@ -338,7 +338,6 @@ .markup .emoji { max-width: none; - vertical-align: text-top; } .markup span.frame { From 996d1a13fe75d7a5a695396cbb18157d2578b4bf Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 28 Mar 2025 11:10:50 +0100 Subject: [PATCH 2/3] remove max-width --- web_src/css/markup/content.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/web_src/css/markup/content.css b/web_src/css/markup/content.css index d379f62143da5..6d985a76a77ce 100644 --- a/web_src/css/markup/content.css +++ b/web_src/css/markup/content.css @@ -336,10 +336,6 @@ padding-right: 28px; } -.markup .emoji { - max-width: none; -} - .markup span.frame { display: block; overflow: hidden; From e52f8fa4e275c658a804e0144c2d83adb3a4b84d Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Fri, 28 Mar 2025 18:16:58 +0800 Subject: [PATCH 3/3] add comment for emoji img --- web_src/css/base.css | 1 + 1 file changed, 1 insertion(+) diff --git a/web_src/css/base.css b/web_src/css/base.css index 8429f6f575959..98eb32bc13eb0 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -989,6 +989,7 @@ table th[data-sortt-desc] .svg { box-shadow: 0 0 0 1px var(--color-secondary) inset; } +/* for "image" emojis like ":git:" ":gitea:" and ":github:" (see CUSTOM_EMOJIS config option) */ .emoji img { border-width: 0 !important; margin: 0 !important;