-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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: Declaration truncated on small mobile screens #84354
Comments
@rustbot claim |
…Gomez Uses flex to fix formatting of h1 at any width Fixes rust-lang#84354.
#84376 is a definite improvement, thanks @torhovland! I'm curious: why fix this by wrapping the trait name and the out-of-band items (version, -, src)? It seems like the problem is not that out-of-band is pushed onto the next line, but the out-of-band interferes with the sizing of the declaration. Generally it seems better for the trait name to use as much of a line as it can, even at the cost of pushing the out-of-band items to the next line. |
Hmm, I didn't wrap anything or otherwise change the HTML structure. I've just introduced You can of course argue that it might be better if the out-of-band items were pushed to the next line, but I feel that justifies its own issue. |
Having said that, it looks easy enough to do. Check out the example at https://jsfiddle.net/uyoLdx6m/2/ I can update #84451 with that if you like. |
Ah, I meant "adding I also hadn't realized that we were already using flex on the method declarations. I agree: if we want to change that it should be its own issue, and in the meantime, good to be consistent and use |
Use flex more consistently Builds on rust-lang#84376, related to rust-lang#84354. - Fully replaces `float: right` with `flex` on `.content .out-of-band`. - Uses `flex` more consistently with existing usage (on `h3`, `h4`, etc.). Tested on various widths to make sure the pages behave as before.
Use flex more consistently Builds on rust-lang#84376, related to rust-lang#84354. - Fully replaces `float: right` with `flex` on `.content .out-of-band`. - Uses `flex` more consistently with existing usage (on `h3`, `h4`, etc.). Tested on various widths to make sure the pages behave as before.
Use flex more consistently Builds on rust-lang#84376, related to rust-lang#84354. - Fully replaces `float: right` with `flex` on `.content .out-of-band`. - Uses `flex` more consistently with existing usage (on `h3`, `h4`, etc.). Tested on various widths to make sure the pages behave as before.
Use flex more consistently Builds on rust-lang#84376, related to rust-lang#84354. - Fully replaces `float: right` with `flex` on `.content .out-of-band`. - Uses `flex` more consistently with existing usage (on `h3`, `h4`, etc.). Tested on various widths to make sure the pages behave as before.
Use flex more consistently Builds on rust-lang#84376, related to rust-lang#84354. - Fully replaces `float: right` with `flex` on `.content .out-of-band`. - Uses `flex` more consistently with existing usage (on `h3`, `h4`, etc.). Tested on various widths to make sure the pages behave as before.
Use flex more consistently Builds on rust-lang#84376, related to rust-lang#84354. - Fully replaces `float: right` with `flex` on `.content .out-of-band`. - Uses `flex` more consistently with existing usage (on `h3`, `h4`, etc.). Tested on various widths to make sure the pages behave as before.
Use flex more consistently Builds on rust-lang#84376, related to rust-lang#84354. - Fully replaces `float: right` with `flex` on `.content .out-of-band`. - Uses `flex` more consistently with existing usage (on `h3`, `h4`, etc.). Tested on various widths to make sure the pages behave as before.
Use flex more consistently Builds on rust-lang#84376, related to rust-lang#84354. - Fully replaces `float: right` with `flex` on `.content .out-of-band`. - Uses `flex` more consistently with existing usage (on `h3`, `h4`, etc.). Tested on various widths to make sure the pages behave as before.
To reproduce, open Chrome devtools, turn on the device toolbar (Ctrl + Shift + M). I believe this defaults to "Moto G4" (360x640). If not, select Moto G4. Then visit, e.g. https://doc.rust-lang.org/nightly/std/io/trait.Read.html.
The stable version of the same page looks fine:
The text was updated successfully, but these errors were encountered: