-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
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 <me@silverwind.io>
Signed-off-by: silverwind <me@silverwind.io>
Not backporting this one, but I think it's good to keep explicit font sizes. |
* giteaofficial/main: Refactor smal code snippeds in models/issues/pull.go (go-gitea#35301) fix: remove duplicate IDs (go-gitea#35210) Add start time on perf trace because it seems some steps haven't been recorded. (go-gitea#35282) nix dev shell add zip (go-gitea#35300) [skip ci] Updated translations via Crowdin Fix LFS range size header response (go-gitea#35277) Skip "parentsigned" check when the repo is empty (go-gitea#35292) [skip ci] Updated translations via Crowdin Fix GitHub release assets URL validation (go-gitea#35287) nix flake use go1.25 (go-gitea#35288) go1.25.0 (go-gitea#35262) fix nix dev shell on darwin (go-gitea#35278) Fix token lifetime, closes go-gitea#35230 (go-gitea#35271) OneDev migration: fix broken migration caused by various REST API changes in OneDev 7.8.0 and later (go-gitea#35216) [skip ci] Updated translations via Crowdin Fix font-size in inline code comment preview (go-gitea#35209) Fix a bug where lfs gc never worked. (go-gitea#35198)
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.