You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rustdoc: Declaration truncated on small mobile screens #84354
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.
#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.
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.
Hmm, I didn't wrap anything or otherwise change the HTML structure. I've just introduced flex here so that (particularly with the addition of #84451) it works the same way as the method declarations further down on the page.
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.
I didn't wrap anything or otherwise change the HTML structure.
Ah, I meant "adding flex so the trait name can line-wrap."
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 flex here.
Activity
torhovland commentedon Apr 20, 2021
@rustbot claim
torhovland commentedon Apr 20, 2021
Using flex on
h1, now it's like this on narrow screens:Rollup merge of rust-lang#84376 - torhovland:issue-84534, r=Guillaume…
Rollup merge of rust-lang#84376 - torhovland:issue-84534, r=Guillaume…
jsha commentedon Apr 23, 2021
#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.
torhovland commentedon Apr 23, 2021
Hmm, I didn't wrap anything or otherwise change the HTML structure. I've just introduced
flexhere so that (particularly with the addition of #84451) it works the same way as the method declarations further down on the page.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.
torhovland commentedon Apr 23, 2021
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.
jsha commentedon Apr 23, 2021
Ah, I meant "adding
flexso the trait name can line-wrap."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
flexhere.Rollup merge of rust-lang#84451 - torhovland:flex, r=jsha
Rollup merge of rust-lang#84451 - torhovland:flex, r=jsha
Rollup merge of rust-lang#84451 - torhovland:flex, r=jsha
Rollup merge of rust-lang#84451 - torhovland:flex, r=jsha
Rollup merge of rust-lang#84451 - torhovland:flex, r=jsha
Rollup merge of rust-lang#84451 - torhovland:flex, r=jsha
Rollup merge of rust-lang#84451 - torhovland:flex, r=jsha
Rollup merge of rust-lang#84451 - torhovland:flex, r=jsha