-
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
Overflow in sidebar heading "See all _ items" #92421
Labels
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Comments
jsha
added
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
labels
Dec 29, 2021
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 17, 2022
Enable wrapping words by default Faced with a very long word, browsers will let it overflow its box horizontally rather than break it in the middle. We essentially never want that behavior. We would rather break the word and keep it inside its horizontal limits. So we apply a default overflow-wrap: break-word/anywhere to the document as a while. In some contexts we would rather add a horizontal scrollbar (code blocks), or elide the excess text with an ellipsis (sidebar). Those still work as expected. Fixes rust-lang#92771 [Some related discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/wrap.20.2F.20overflow.20.2F.20scroll) and a related issue: rust-lang#92421. Demo: https://rustdoc.crud.net/jsha/overflow-wrap/std/iter/trait.Iterator.html#method.try_find r? ``@GuillaumeGomez``
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)
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
When a crate name is long, the "See all
<crate name>
items" heading in the sidebar overflows its box.E.g.: https://docs.rs/trillium-caching-headers/0.1.0/trillium_caching_headers/index.html
Note that
Crate trillium_caching_headers
above it does not overflow, because it hasword-wrap: break-word
. Perhaps we should consider applying that to everything as a default (since we often have this type of overflow problem), and override that default in specific places, like code examples, where we'd rather have a horizontal scroll.Another recent example of overflowing a box was #89972 (and a fix in #90018).
cc @GuillaumeGomez
The text was updated successfully, but these errors were encountered: