Rustdoc does not show more of the item summary if there is enough room for it
@lolbinarycat is already working on this.
Since Aug 24, 2025.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Code
/// some really long summary paragraph that doesn't fit on one screen at all and will be truncated.
pub fn foo() {}
Reproduction Steps
- document the crate and open it (via
cargo doc --openor directly via rustdoc) - search "foo"
- zoom out
- collapse sidebar
- in firefox, make sure "Zoom text only" is enabled
Expected Outcome
All of the extra space means the summary paragraph is visible now.
Actual Output
still an ellipsis.
Version
rustdoc 1.90.0-nightly (9748d87dc 2025-07-21)
Additional Details
grid-template-columns generally seems to be given very rough values that do not adapt very well to different screen sizes. This applies both in search results and also to the module pages to some extent.
I used calc(min(33%, 20em)) auto which seemed to work better for large screen sizes while also working the same for small screens.
The search results page adds a hard ellipsis using js instead of using text-overflow: elipsis (which I usually dislike but I think is the correct thing to use here)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.