]> source.dussan.org Git - gitea.git/commitdiff
Fix line height on inline code preview (#30372) (#30385)
authorGiteabot <teabot@gitea.io>
Wed, 10 Apr 2024 05:49:40 +0000 (13:49 +0800)
committerGitHub <noreply@github.com>
Wed, 10 Apr 2024 05:49:40 +0000 (05:49 +0000)
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 <me@silverwind.io>
web_src/css/base.css

index ec9e51ad45868d88cf7d601800fcc122852286c3..69fa74d3e50c0407951fe376de2f90d805d7663f 100644 (file)
@@ -1316,6 +1316,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 {