1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-16 22:48:27 +00:00

Fix font-size in inline code comment preview (#35209)

Previously, when writing a inline code comment, the markup preview would
have incorrect font size of 16px. This fixes it to 14px and also
combines similar CSS rules into one.

I'm not a fan of this selector complexity, but it seems like a necessity
because standalone markup files render at 16px while comments render at
14px.

---------

Signed-off-by: silverwind <me@silverwind.io>
This commit is contained in:
silverwind
2025-08-12 10:06:45 +02:00
committed by GitHub
parent 90a48e96c7
commit e02b47d2f3
2 changed files with 2 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
.markup { .markup {
overflow: hidden; overflow: hidden;
font-size: 16px; font-size: 14px; /* 14px for comments, overridden to 16px for .file-view below. */
line-height: 1.5 !important; line-height: 1.5 !important;
overflow-wrap: break-word; overflow-wrap: break-word;
} }
@@ -318,6 +318,7 @@ In markup content, we always use bottom margin for all elements */
.file-view.markup { .file-view.markup {
padding: 1em 2em; padding: 1em 2em;
font-size: 16px;
} }
.file-view.markup:has(.file-not-rendered-prompt) { .file-view.markup:has(.file-not-rendered-prompt) {

View File

@@ -300,10 +300,6 @@ td .commit-summary {
min-width: 100px; min-width: 100px;
} }
.repository.new.issue .comment.form .content .markup {
font-size: 14px;
}
.repository.view.issue .instruct-toggle { .repository.view.issue .instruct-toggle {
display: inline-block; display: inline-block;
} }
@@ -630,10 +626,6 @@ td .commit-summary {
background: var(--color-light); background: var(--color-light);
} }
.repository.view.issue .comment-list .comment .markup {
font-size: 14px;
}
.repository.view.issue .comment-list .comment .no-content { .repository.view.issue .comment-list .comment .no-content {
color: var(--color-text-light-2); color: var(--color-text-light-2);
font-style: italic; font-style: italic;
@@ -723,10 +715,6 @@ td .commit-summary {
text-align: center; text-align: center;
} }
.repository.compare.pull .markup {
font-size: 14px;
}
.repository.branches .commit-divergence .bar-group { .repository.branches .commit-divergence .bar-group {
position: relative; position: relative;
float: left; float: left;