Fix font-size in inline code comment preview (#35209)
Some checks failed
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been skipped

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