-
Notifications
You must be signed in to change notification settings - Fork 13k
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: Section icon color and font-weight has changed on nightly #91196
Comments
cc @rust-lang/rustdoc |
I can't find the PR but we changed the size. Do you have it @jsha maybe? |
The font-weight increase probably came from #90089, since we increased the font weight of the variant name headings (e.g. Slice in this example). The font-color change comes from #91102. That's accidental and should definitely be fixed. @camelid if we fix the font color is that sufficient, or do you also think the variant name headings should be reduced in weight? FWIW I think they should stay bold to match other headings, like method names. |
I'm ambivalent about the variant name's font weight, but I definitely think the section icon should be reduced in weight. |
That would be a big departure from practice elsewhere in rustdoc: the section icon is always the same weight as the heading it decorates. For instance, look at section headings and method headings. |
Really? This section icon looks way more bold than any other section icon I've seen. The variant name itself also looks a higher font weight, though maybe that part's an optical illusion. |
Both the section icon and the variant name are font-weight 600. To verify: In Chrome, right-click, inspect element, click over to the Computed tab on the right, scroll down to font-weight. For comparison, do the same on the method heading at https://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_bytes. Also font-weight 600. An important difference, though: method headings have a font-size of 1em (16px), while variant headings have a font-size of 1.1em (17.6px). Also the variant headings have a lot more vertical space surrounding them, which probably makes them look even bigger than that. |
Ok, the color has been fixed now. The font-weight has not been changed, so we need to decide about that. |
Yeah, but inherent methods don't have section icons :) I think I'm okay with accepting the font-weight + size of the variant section icon for consistency. This kind of ties into the discussion about making rustdoc consistent about using section icons vs self-links (cc #90331 (comment)). |
I don't know for sure whether this is intentional, but the new icon styling is a bit more distracting IMO.
nightly (new)
beta (old)
The text was updated successfully, but these errors were encountered: