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 should show the name of an item on a separate line before its description on small screens #78799

Closed
RDambrosio016 opened this issue Nov 6, 2020 · 3 comments
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@RDambrosio016
Copy link
Contributor

Sometimes, on small screens, reading rustdoc documentation feels like solving a crossword puzzle:

oh no word wrap please

It would be great if instead of doing this, rustdoc would just place the name on the line before and then the description as such:

function_name
Description here

@jyn514 jyn514 added A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 6, 2020
@arj101
Copy link

arj101 commented Nov 6, 2020

This can be reproduced in Chrome dev tools too.

screenshot

@jsha
Copy link
Contributor

jsha commented Apr 22, 2021

This was effectively fixed in #79936. The solution is not exactly as proposed here. It doesn't put the name on a separate line, but instead sets a minimum width. Still, I think it solves the main problem.

The issue here is that the list shown (on a crate summary page, e.g. https://docs.rs/ureq/2.1.0/ureq/#functions or https://doc.rust-lang.org/nightly/std/#keywords, is rendered using <table>, <tr>, and <td>. Rendering the item name on a separate line would require getting rid of the table layout, which I think would be rather complicated.

I think we should close this. @RDambrosio016 is the issue sufficiently resolved for you?

@RDambrosio016
Copy link
Contributor Author

Yeah that works for me

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