From 12f721717b5c9f90725be34a61f5685a3fcbb0c5 Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 10 Apr 2024 07:44:48 +0200 Subject: [PATCH] Fix line height on inline code preview (#30372) 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. (cherry picked from commit 6cac11cb1bc4b42bc7851a59b1f3a94700c5eb84) --- 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 ada5b87282..f4414d47db 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -1260,6 +1260,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 {