Skip to content
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

rustdoc output on nightly uses bold text in Safari #119050

Open
jwodder opened this issue Dec 17, 2023 · 4 comments
Open

rustdoc output on nightly uses bold text in Safari #119050

jwodder opened this issue Dec 17, 2023 · 4 comments
Labels
A-rustdoc-ui Area: rustdoc UI (generated HTML) C-bug Category: This is a bug. O-macos Operating system: macOS T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jwodder
Copy link

jwodder commented Dec 17, 2023

Running cargo +nightly doc on a library crate and viewing the resulting documentation in Safari 17.2 on macOS Sonoma 14.2 results in all non-code text being bold, like so:

Screenshot 2023-12-17 at 12 06 35

However, if cargo doc is run on the same crate using Rust stable 1.74.1, the resulting docs are formatted correctly:

Screenshot 2023-12-17 at 12 07 42

When the built-on-nightly docs are opened in Firefox or Chrome, the text is not bold. Recently-built docs on docs.rs are not bold in Safari at all.

Inspecting the web elements shows that Safari considers the text to have a font-weight of 400 (normal), so I'm guessing the problem is down to the selection of the font. However, this is where my web styling skills end.

Stable Rust version:

rustc --version --verbose:

rustc 1.74.1 (a28077b28 2023-12-04)
binary: rustc
commit-hash: a28077b28a02b92985b3a3faecf92813155f1ea1
commit-date: 2023-12-04
host: x86_64-apple-darwin
release: 1.74.1
LLVM version: 17.0.4

Nightly Rust version:

rustc +nightly --version --verbose:

rustc 1.76.0-nightly (445177724 2023-12-16)
binary: rustc
commit-hash: 445177724ac2beebf4faa5a3ffacb2adbe7e7846
commit-date: 2023-12-16
host: x86_64-apple-darwin
release: 1.76.0-nightly
LLVM version: 17.0.6

Crate used to build docs shown above: https://github.com/jwodder/strtoint (though the problem happens with every library crate I build docs for)

@jwodder jwodder added the C-bug Category: This is a bug. label Dec 17, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 17, 2023
@saethlin saethlin added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-ui Area: rustdoc UI (generated HTML) and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Dec 17, 2023
@notriddle
Copy link
Contributor

I've bisected it: 2023-11-07 is good, 2023-11-08 is bad.

It's probably #115904

@notriddle
Copy link
Contributor

A few other notes about this bug:

  • Both of the OP screenshots are demonstrating a bug. Everything being bold is just more severe. It's supposed to look like this.

    image

    Notice how, in this screenshot, the header is bold. It's too thin in both of the OP screenshots. I suspect this is the same bug, because it goes away when I fetch through python -mhttp.server.

  • Also, the bug does not show up when I try to reproduce with python -mhttp.server. I can only make it happen using file:// URLs.

In other words, this has got to be a Safari bug.

@notriddle
Copy link
Contributor

Found the problem. This is just a new manifestation of #98769

@fmease fmease added the O-macos Operating system: macOS label Jan 16, 2024
@kadiwa4
Copy link
Contributor

kadiwa4 commented Mar 21, 2024

Fixed by #122410.

Issue #85444 is used to find a solution for the remaining case (if you have dev tools disabled, the styling doesn't work at all).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: rustdoc UI (generated HTML) C-bug Category: This is a bug. O-macos Operating system: macOS T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants