Skip to content

rustdoc output on nightly uses bold text in Safari #119050

Open
@jwodder

Description

@jwodder

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.O-macosOperating system: macOST-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions