Skip to content

Commit e02b47d

Browse files
authored
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 <[email protected]>
1 parent 90a48e9 commit e02b47d

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

web_src/css/markup/content.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.markup {
22
overflow: hidden;
3-
font-size: 16px;
3+
font-size: 14px; /* 14px for comments, overridden to 16px for .file-view below. */
44
line-height: 1.5 !important;
55
overflow-wrap: break-word;
66
}
@@ -318,6 +318,7 @@ In markup content, we always use bottom margin for all elements */
318318

319319
.file-view.markup {
320320
padding: 1em 2em;
321+
font-size: 16px;
321322
}
322323

323324
.file-view.markup:has(.file-not-rendered-prompt) {

web_src/css/repo.css

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,6 @@ td .commit-summary {
300300
min-width: 100px;
301301
}
302302

303-
.repository.new.issue .comment.form .content .markup {
304-
font-size: 14px;
305-
}
306-
307303
.repository.view.issue .instruct-toggle {
308304
display: inline-block;
309305
}
@@ -630,10 +626,6 @@ td .commit-summary {
630626
background: var(--color-light);
631627
}
632628

633-
.repository.view.issue .comment-list .comment .markup {
634-
font-size: 14px;
635-
}
636-
637629
.repository.view.issue .comment-list .comment .no-content {
638630
color: var(--color-text-light-2);
639631
font-style: italic;
@@ -723,10 +715,6 @@ td .commit-summary {
723715
text-align: center;
724716
}
725717

726-
.repository.compare.pull .markup {
727-
font-size: 14px;
728-
}
729-
730718
.repository.branches .commit-divergence .bar-group {
731719
position: relative;
732720
float: left;

0 commit comments

Comments
 (0)