Skip to content
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

Add word wrap for short descriptions #77699

Merged
merged 2 commits into from
Oct 12, 2020
Merged

Conversation

GuillaumeGomez
Copy link
Member

@rust-highfive

This comment has been minimized.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 8, 2020
@jyn514 jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 8, 2020
@jyn514
Copy link
Member

jyn514 commented Oct 9, 2020

Will this affect word-wrapping in paragraphs with longer text? I saw there was some undesired behavior in rust-lang/blog.rust-lang.org#508 (comment), will that show up here?

@jyn514
Copy link
Member

jyn514 commented Oct 9, 2020

r? @XAMPPRocky

I don't feel comfortable reviewing this, I don't know enough about CSS.

@rust-highfive rust-highfive assigned XAMPPRocky and unassigned jyn514 Oct 9, 2020
@XAMPPRocky
Copy link
Member

@jyn514 This should be fine as it mostly just affects really long string of characters, most words won’t be broken up unless you set it to break-word. You can see an example in the MDN documentation. https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap

@jyn514 jyn514 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 11, 2020
@jyn514
Copy link
Member

jyn514 commented Oct 12, 2020

@bors r=XAMPPRocky

This seems reasonable; not sure I understand everything it does but it seems better than the status quo.

@bors
Copy link
Contributor

bors commented Oct 12, 2020

📌 Commit 9f1048d has been approved by XAMPPRocky

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 12, 2020
@GuillaumeGomez
Copy link
Member Author

@bors: rollup

JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 12, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 12, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 12, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#77550 (add shims for WithOptConstParam query calls)
 - rust-lang#77699 (Add word wrap for short descriptions)
 - rust-lang#77724 (Implement `AsRawFd` for `StdinLock` etc. on WASI.)
 - rust-lang#77746 (Fix `x.py setup` sets `changelog-seen`)
 - rust-lang#77784 (Fix intra-docs link in core::ffi::VaList)
 - rust-lang#77811 (rustdoc: Make some functions private that don't need to be public)
 - rust-lang#77818 (Mono collector: replace pair of ints with Range)
 - rust-lang#77831 (Use std methods on char instead of open coding them)
 - rust-lang#77852 (update url in bootstrap README (gcc-rs -> cc-rs))
 - rust-lang#77863 (Remove `mark-i-m` from rustc-dev-guide maintainers)

Failed merges:

r? `@ghost`
@bors bors merged commit a6cc660 into rust-lang:master Oct 12, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 12, 2020
@GuillaumeGomez GuillaumeGomez deleted the word-wrap branch October 13, 2020 08:21
notriddle added a commit to notriddle/rust that referenced this pull request Dec 23, 2022
The rules `overflow:hidden` and `text-overflow:ellipses` only have an
effect if overflow occurs, which cannot happen because it will just line
wrap instead.

These rules definitely became obsolete by
rust-lang#77699, when the stylesheet was
decidedly changed to have line wrapping in short docblocks, but given the
bug it was fixing, this probably got broken earlier.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 23, 2022
…-overflow, r=GuillaumeGomez

rustdoc: remove no-op CSS from `.docblock-short`

The rules `overflow:hidden` and `text-overflow:ellipses` only have an effect if overflow occurs, which cannot happen because it will just line wrap instead.

These rules definitely became obsolete by rust-lang#77699, when the stylesheet was decidedly changed to have line wrapping in short docblocks, but given the bug it was fixing, this probably got broken earlier.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 23, 2022
…-overflow, r=GuillaumeGomez

rustdoc: remove no-op CSS from `.docblock-short`

The rules `overflow:hidden` and `text-overflow:ellipses` only have an effect if overflow occurs, which cannot happen because it will just line wrap instead.

These rules definitely became obsolete by rust-lang#77699, when the stylesheet was decidedly changed to have line wrapping in short docblocks, but given the bug it was fixing, this probably got broken earlier.
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Dec 24, 2022
…, r=GuillaumeGomez

rustdoc: remove no-op CSS from `.docblock-short`

The rules `overflow:hidden` and `text-overflow:ellipses` only have an effect if overflow occurs, which cannot happen because it will just line wrap instead.

These rules definitely became obsolete by rust-lang/rust#77699, when the stylesheet was decidedly changed to have line wrapping in short docblocks, but given the bug it was fixing, this probably got broken earlier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Very long monospace words cause rustdoc to look strange
6 participants