From 01129b593f667bad32786adb83f4834ccd2f8f56 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 10 Apr 2024 13:49:40 +0800 Subject: [PATCH] Fix line height on inline code preview (#30372) (#30385) Backport #30372 by @silverwind Fixes https://github.com/go-gitea/gitea/issues/30353. I don't know what causes `code-inner` to not inherit `line-height` from its direct parent `.lines-code` but instead from grandparent `.markup` even thought MDN tells me it's [inherited](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height#formal_definition). This causes no negative impact on other code views, so I think it's the best solution. Co-authored-by: silverwind (cherry picked from commit 88b3d192a0663bd5f25ffa07af45179bac755150) --- 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 f19e3f0299..174523b649 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -1334,6 +1334,7 @@ overflow-menu .ui.label { white-space: pre-wrap; word-break: break-all; overflow-wrap: anywhere; + line-height: inherit; /* needed for inline code preview in markup */ } .blame .code-inner {