-
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
rustdoc: fix weird margins between Deref impl items #110964
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the old setup, if the dereffed-to item has multiple impl blocks, each one gets its own `div.impl-items` in the section, but there are no headers separating them. Since the last method in a `div.impl-items` has no bottom margin, and there are no margins between these divs, there is no margin between the last method of one impl and the first method of the following impl. This patch fixes it by simplifying the HTML. Each Deref block gets exactly one `div.impl-items`, no matter how many impl blocks it actually has.
(rustbot has picked a reviewer for you, use r? to override) |
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
labels
Apr 28, 2023
GuillaumeGomez
approved these changes
Apr 29, 2023
This is super cool, thanks! @bors r+ rollup |
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-review
Status: Awaiting review from the assignee but also interested parties.
labels
Apr 29, 2023
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Apr 29, 2023
…GuillaumeGomez rustdoc: fix weird margins between Deref impl items ## Before ![image](https://user-images.githubusercontent.com/1593513/235245977-90770591-22c1-4a27-9464-248a3729a2b7.png) ## After ![image](https://user-images.githubusercontent.com/1593513/235246009-0e83113e-42b7-4e29-981d-969f9d20af01.png) ## Description In the old setup, if the dereffed-to item has multiple impl blocks, each one gets its own `div.impl-items` in the section, but there are no headers separating them. Since the last method in a `div.impl-items` has no bottom margin, and there are no margins between these divs, there is no margin between the last method of one impl and the first method of the following impl. This patch fixes it by simplifying the HTML. Each Deref block gets exactly one `div.impl-items`, no matter how many impl blocks it actually has.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Apr 29, 2023
…GuillaumeGomez rustdoc: fix weird margins between Deref impl items ## Before ![image](https://user-images.githubusercontent.com/1593513/235245977-90770591-22c1-4a27-9464-248a3729a2b7.png) ## After ![image](https://user-images.githubusercontent.com/1593513/235246009-0e83113e-42b7-4e29-981d-969f9d20af01.png) ## Description In the old setup, if the dereffed-to item has multiple impl blocks, each one gets its own `div.impl-items` in the section, but there are no headers separating them. Since the last method in a `div.impl-items` has no bottom margin, and there are no margins between these divs, there is no margin between the last method of one impl and the first method of the following impl. This patch fixes it by simplifying the HTML. Each Deref block gets exactly one `div.impl-items`, no matter how many impl blocks it actually has.
This was referenced Apr 29, 2023
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 29, 2023
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#105848 (rustdoc: Add a new lint for broken inline code) - rust-lang#110644 (Update tests for libtest `--format json`) - rust-lang#110950 (Deny the `unsafe_op_in_unsafe_fn` lint in `rustc_arena`.) - rust-lang#110951 (Add support for LibreSSL 3.7.x) - rust-lang#110964 (rustdoc: fix weird margins between Deref impl items) - rust-lang#110979 (windows: kill rust-analyzer-proc-macro-srv before deleting stage0 directory) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before
After
Description
In the old setup, if the dereffed-to item has multiple impl blocks, each one gets its own
div.impl-items
in the section, but there are no headers separating them. Since the last method in adiv.impl-items
has no bottom margin, and there are no margins between these divs, there is no margin between the last method of one impl and the first method of the following impl.This patch fixes it by simplifying the HTML. Each Deref block gets exactly one
div.impl-items
, no matter how many impl blocks it actually has.