Skip to content

Commit

Permalink
Unrolled build for rust-lang#128023
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#128023 - Kijewski:pr-table-width, r=notriddle

rustdoc: short descriptions cause word-breaks in tables

The `.item-table` class is used to display name+description lists, e.g. the exported functions, as a table. If the names are long and the descriptions are short, then the width of the table does not expand to the whole size, but only uses a fraction. This causes a some names to break inside a word.

This change makes the table always use 100% of its parent width. The `.width-limiter` wrapper already ensures that the used width still does not become excessive.

See e.g. <https://docs.rs/mathlab/0.3.0/mathlab/fun/vec_num/index.html> or <https://docs.rs/cw-events/0.0.9/cw_events/> (random choices out of the list of the recent releases).

[![](https://i.imgur.com/XnH4eeT.png)](https://imgur.com/XnH4eeT) [![](https://i.imgur.com/7iQ9xE2.png)](https://imgur.com/7iQ9xE2)

The problem occurs (at least) in Firefox 130, Falkon 24, and Konqueror 22. It does not occur in Chrome 126.
  • Loading branch information
rust-timer committed Jul 22, 2024
2 parents 0f8534e + 9533544 commit 257204a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,7 @@ table,
display: table;
padding: 0;
margin: 0;
width: 100%;
}
.item-table > li {
display: table-row;
Expand Down

0 comments on commit 257204a

Please sign in to comment.