-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Fix font-size in inline code comment preview #35209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Then you could just use 16px for |
Hmm yeah probably the better alternative. I'm not aware of any other places that render markup as 16px, but there could be some that I missed. |
Tested it in repo file view and readme, they both render as expected 16px while all other places (comments) render 14px. |
web_src/css/markup/content.css
Outdated
@@ -1,6 +1,6 @@ | |||
.markup { | |||
overflow: hidden; | |||
font-size: 16px; | |||
font-size: 14px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should remove this and use the parent's font-size.
Body's default font-size is also 14px IIRC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have html, body {font-size: 14px}
, yes. But I'm not confident that inheriting wouldn't break anything. I think it's better to explicitely specify 14px/16px than to rely on potentially incorrect surrounding content.
Signed-off-by: silverwind <[email protected]>
Signed-off-by: silverwind <[email protected]>
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.