Skip to content

Header bar font is different on front page and rustdoc files #935

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

Closed
jyn514 opened this issue Aug 4, 2020 · 3 comments · Fixed by #982
Closed

Header bar font is different on front page and rustdoc files #935

jyn514 opened this issue Aug 4, 2020 · 3 comments · Fixed by #982
Labels
A-frontend Area: Web frontend P-low Low priority issues

Comments

@jyn514
Copy link
Member

jyn514 commented Aug 4, 2020

Regression introduced in #930.

rustdoc page
home page

@Nemo157 suggested this is because the writer puts the navigation nested under .rustdoc and the style sets the .rustdoc font differently. We probably just need an override resetting the nav-bar font style to what's used for the rest of the body outside rustdoc.

@jyn514 jyn514 added P-low Low priority issues A-frontend Area: Web frontend labels Aug 4, 2020
@cynecx
Copy link
Contributor

cynecx commented Aug 18, 2020

Screenshot from 2020-08-18 17-08-03

Moving the "topbar" out of the tranformed rustdoc body should fix this (Hence using the correct font-family and not the overwritten one by the css class div.rustdoc). Tbh it doesn't make much sense to have the topbar in the rustdoc container since it has position: fixed anyway.

If this is the desired approach, I could open a PR.

@jyn514
Copy link
Member Author

jyn514 commented Aug 18, 2020

That sounds good to me! I think the way to implement this is by moving it from templates/rustdoc/body.html to templates/rustdoc/head.html.

@cynecx
Copy link
Contributor

cynecx commented Aug 18, 2020

@jyn514 Mh. I don't think that's a good idea? That would put the nav-container div inside the head element which is not a good idea (as I understand it is invalid HTML5). Afaict changes to https://github.com/rust-lang/docs.rs/blob/master/src/utils/html.rs are required, no? (In order to put the topbar before the actual rustdoc container.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Web frontend P-low Low priority issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants