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: Section icon color and font-weight has changed on nightly #91196

Closed
camelid opened this issue Nov 24, 2021 · 9 comments
Closed

rustdoc: Section icon color and font-weight has changed on nightly #91196

camelid opened this issue Nov 24, 2021 · 9 comments
Labels
A-rustdoc-ui Area: rustdoc UI (generated HTML) regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@camelid
Copy link
Member

camelid commented Nov 24, 2021

I don't know for sure whether this is intentional, but the new icon styling is a bit more distracting IMO.

nightly (new)

image

beta (old)

image

@camelid camelid added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. A-rustdoc-ui Area: rustdoc UI (generated HTML) labels Nov 24, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Nov 24, 2021
@camelid
Copy link
Member Author

camelid commented Nov 24, 2021

cc @rust-lang/rustdoc

@GuillaumeGomez
Copy link
Member

I can't find the PR but we changed the size. Do you have it @jsha maybe?

@jsha
Copy link
Contributor

jsha commented Nov 24, 2021

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.

@camelid
Copy link
Member Author

camelid commented Nov 24, 2021

@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.

@jsha
Copy link
Contributor

jsha commented Nov 24, 2021

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.

@camelid
Copy link
Member Author

camelid commented Nov 24, 2021

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.

@jsha
Copy link
Contributor

jsha commented Nov 24, 2021

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.

@camelid
Copy link
Member Author

camelid commented Nov 26, 2021

Ok, the color has been fixed now. The font-weight has not been changed, so we need to decide about that.

@camelid
Copy link
Member Author

camelid commented Nov 26, 2021

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.

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)).

@camelid camelid closed this as completed Nov 26, 2021
@camelid camelid removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Nov 26, 2021
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) regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. 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

4 participants