Bold text no longer displayed as bold #10885

Closed
opened 2025-11-02 09:21:09 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @wolfbeast on GitHub (May 21, 2023).

Description

With one of the recent updates of our self-hosted Gitea (probably when moving to 1.19.3 from 1.18.*) some formatting no longer applies.
Most notably, headers and bold text is no longer rendered as such.

I checked the CSS involced and found:

b, strong, h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
}
b, strong {
    font-weight: bolder;
}

It seems the --font-weight-bold value is not filled properly or set to a bad value.
This occurs in the Pale Moon web browser. It does not occur in Edge.

Gitea Version

1.19.3

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

https://repo.palemoon.org/MoonchildProductions/UXP/issues/2252#issuecomment-36448
Image1

Git Version

2.39.2, Wire Protocol Version 2 Enabled

Operating System

CentOS

How are you running Gitea?

x86_64 Linux binary downloaded from gitea.io

Database

MySQL

Originally created by @wolfbeast on GitHub (May 21, 2023). ### Description With one of the recent updates of our self-hosted Gitea (probably when moving to 1.19.3 from 1.18.*) some formatting no longer applies. Most notably, headers and bold text is no longer rendered as such. I checked the CSS involced and found: ```CSS b, strong, h1, h2, h3, h4, h5, h6 { font-weight: var(--font-weight-bold); } b, strong { font-weight: bolder; } ``` It seems the `--font-weight-bold` value is not filled properly or set to a bad value. This occurs in the Pale Moon web browser. It does not occur in Edge. ### Gitea Version 1.19.3 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots https://repo.palemoon.org/MoonchildProductions/UXP/issues/2252#issuecomment-36448 ![Image1](https://github.com/go-gitea/gitea/assets/3359132/fb64b8b5-4bdd-40b1-8638-f41d7a58b377) ### Git Version 2.39.2, Wire Protocol Version 2 Enabled ### Operating System CentOS ### How are you running Gitea? x86_64 Linux binary downloaded from gitea.io ### Database MySQL
GiteaMirror added the issue/needs-feedbacktype/bug labels 2025-11-02 09:21:09 -06:00
Author
Owner

@wxiaoguang commented on GitHub (May 21, 2023):

I am 99.99% sure it's related to your browser & font system ....

Does #24305 help? (a test link https://codepen.io/silverwind/pen/jOeBmvj ) , ps: there is also a following PR #24827 to reset the bold value to 600 from 601.

@wxiaoguang commented on GitHub (May 21, 2023): I am 99.99% sure it's related to your browser & font system .... Does #24305 help? (a test link https://codepen.io/silverwind/pen/jOeBmvj ) , ps: there is also a following PR #24827 to reset the bold value to 600 from 601.
Author
Owner

@wolfbeast commented on GitHub (May 21, 2023):

Yeah the test link gives inconsistent results.
It weirdly renders 600 slightly bolder (semi-bold) but 601 and 610 as if it's not bold ... o.O -- not sure what's going on with Segoe UI there...

Image1

700 is proper bold. IIRC that is also the weight I'd always had to use when menually setting these values in my web design way back when. having it at 600 would work on my system, obviously (Windows 10 22H2, Radeon graphics).
But.. why not just use the normal keywords instead of fine-tuning? font-weight: bold is a thing, you know :)

The linked issue doesn't really give a solution how to solve this in my installation though. I'd be happy to just set it to 600 or bold, respectively. How would I override this non-functional default?

@wolfbeast commented on GitHub (May 21, 2023): Yeah the test link gives inconsistent results. It weirdly renders 600 _slightly_ bolder (semi-bold) but 601 and 610 as if it's _not_ bold ... o.O -- not sure what's going on with Segoe UI there... ![Image1](https://github.com/go-gitea/gitea/assets/3359132/47e02653-81e5-40fb-aa73-2f53f1ae9b32) 700 is proper bold. IIRC that is also the weight I'd always had to use when menually setting these values in my web design way back when. having it at 600 would work on my system, obviously (Windows 10 22H2, Radeon graphics). But.. why not just use the normal keywords instead of fine-tuning? `font-weight: bold` is a thing, you know :) The linked issue doesn't really give a solution how to solve this in my installation though. I'd be happy to just set it to 600 or `bold`, respectively. How would I override this non-functional default?
Author
Owner

@wxiaoguang commented on GitHub (May 21, 2023):

But.. why not just use the normal keywords instead of fine-tuning? font-weight: bold is a thing, you know :)

The context is here : https://github.com/go-gitea/gitea/issues/24305#issuecomment-1520392895

@wxiaoguang commented on GitHub (May 21, 2023): > But.. why not just use the normal keywords instead of fine-tuning? `font-weight: bold` is a thing, you know :) The context is here : https://github.com/go-gitea/gitea/issues/24305#issuecomment-1520392895
Author
Owner

@wxiaoguang commented on GitHub (May 21, 2023):

The linked issue doesn't really give a solution how to solve this in my installation though. I'd be happy to just set it to 600 or bold, respectively. How would I override this non-functional default?

ps: there is also a following PR #24827 to reset the bold value to 600 from 601.

Here it is.

@wxiaoguang commented on GitHub (May 21, 2023): > The linked issue doesn't really give a solution how to solve this in my installation though. I'd be happy to just set it to 600 or `bold`, respectively. How would I override this non-functional default? >> ps: there is also a following PR #24827 to reset the bold value to 600 from 601. Here it is.
Author
Owner

@wolfbeast commented on GitHub (May 21, 2023):

Thanks, but... how do I apply that to my system? I'm a binary user -- I tend to use it stock (since I had nightmares previously using custom templates)

@wolfbeast commented on GitHub (May 21, 2023): Thanks, but... how do I apply that to my system? I'm a binary user -- I tend to use it stock (since I had nightmares previously using custom templates)
Author
Owner

@wxiaoguang commented on GitHub (May 21, 2023):

After the PR gets merged and backported, you can use nightly build.

For "custom template", if you only use something like custom/templates/custom/header.tmpl to inject JS/CSS, there won't be any nightmare, because this file will never conflict with the builtin ones.

image

@wxiaoguang commented on GitHub (May 21, 2023): After the PR gets merged and backported, you can use nightly build. For "custom template", if you only use something like `custom/templates/custom/header.tmpl` to inject JS/CSS, there won't be any nightmare, because this file will never conflict with the builtin ones. ![image](https://github.com/go-gitea/gitea/assets/2114189/15f9f20e-eb93-4621-b4d9-7c75becfb0fb)
Author
Owner

@wolfbeast commented on GitHub (May 21, 2023):

Thanks, I appreciate the help!

@wolfbeast commented on GitHub (May 21, 2023): Thanks, I appreciate the help!
Author
Owner

@wolfbeast commented on GitHub (May 21, 2023):

FTR I went the custom template route (not comfortable running a nightly on a pivotal production repo):

<style>
:root {
  --font-weight-bold: 600;
}
</style>

Which fixes the issue on my setup. I'm thinking this may be a quirk of the Segoe font specifically? Either way, since it's already addressed in the PR otherwise I'll just close this.

@wolfbeast commented on GitHub (May 21, 2023): FTR I went the custom template route (not comfortable running a nightly on a pivotal production repo): ```HTML <style> :root { --font-weight-bold: 600; } </style> ``` Which fixes the issue on my setup. I'm thinking this may be a quirk of the Segoe font specifically? Either way, since it's already addressed in the PR otherwise I'll just close this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10885