-
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: remove old CSS selector that causes weird spacing #101335
Conversation
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @Folyd, @jsha |
r? @jsha (rust-highfive has picked a reviewer for you, use r? to override) |
Thanks! r=me once CI pass. |
@GuillaumeGomez Never mind. I misunderstood some of the code (confused Turns out you can still get this CSS reachable. |
@GuillaumeGomez However, I'm a bit curious if we actually want this CSS here. It still seems outdated, because when I manage to trigger it, the results look worse to me than if it were gone. |
If it creates ugly output when triggered, I'd say it's possible if it gets removed. |
r=me once CI pass then! |
@GuillaumeGomez I posted some screenshots and links to samples. Do you think the "this is what we get if we merge this PR" version looks better than the old one? |
.methods > .item-info
It was added with e08a84a (actually, it was called `.methods > .stability` at the time) and was directly nested that way. But with the switch to `<details>`, the code has changed drastically out from under it, to the point where you have to go out of your way to actually get it to render this way, and the result looks overly-tight and weird alongside the normal version where this code is not reachable.
3f070c4
to
df09047
Compare
Oh I see. So it has an impact when there is no doc block. Maybe we need to update: .content .impl-items > .item-info {
margin-left: 32px;
} so they still are aligned? Adding a GUI test for it would be nice too. |
Can upload the updated version too please? |
@GuillaumeGomez It's uploaded. |
Apart from the small potential improvement in the GUI test, looks great! 👍 |
0d59fe3
to
17622fc
Compare
17622fc
to
0f29824
Compare
Thanks! r=me once CI pass |
@bors r+ rollup |
…ity, r=notriddle rustdoc: remove old CSS selector that causes weird spacing It was added with e08a84a (actually, it was called `.methods > .stability` at the time) and was directly nested that way. **EDIT**: It is technically reachable code still, but it seems wrong. ## With the old CSS rule still present https://notriddle.com/notriddle-rustdoc-test/weird-spacing/lib/struct.Foo.html ![image](https://user-images.githubusercontent.com/1593513/188216226-c667c560-d33d-494f-a492-4e0ec3ac0009.png) ## Version 2 (an older version of this PR) https://notriddle.com/notriddle-rustdoc-test/normal-spacing-2/lib/struct.Foo.html ![image](https://user-images.githubusercontent.com/1593513/188216418-9fcd3109-f1b2-425d-b4fc-0c6b3b54e48e.png) ## Version 3 (with alignment fix for mobile) https://notriddle.com/notriddle-rustdoc-test/normal-spacing-3/lib/struct.Foo.html ![image](https://user-images.githubusercontent.com/1593513/188223161-0e1ebce7-842f-41cb-8a0c-ae43aedcfccc.png)
…ity, r=notriddle rustdoc: remove old CSS selector that causes weird spacing It was added with e08a84a (actually, it was called `.methods > .stability` at the time) and was directly nested that way. **EDIT**: It is technically reachable code still, but it seems wrong. ## With the old CSS rule still present https://notriddle.com/notriddle-rustdoc-test/weird-spacing/lib/struct.Foo.html ![image](https://user-images.githubusercontent.com/1593513/188216226-c667c560-d33d-494f-a492-4e0ec3ac0009.png) ## Version 2 (an older version of this PR) https://notriddle.com/notriddle-rustdoc-test/normal-spacing-2/lib/struct.Foo.html ![image](https://user-images.githubusercontent.com/1593513/188216418-9fcd3109-f1b2-425d-b4fc-0c6b3b54e48e.png) ## Version 3 (with alignment fix for mobile) https://notriddle.com/notriddle-rustdoc-test/normal-spacing-3/lib/struct.Foo.html ![image](https://user-images.githubusercontent.com/1593513/188223161-0e1ebce7-842f-41cb-8a0c-ae43aedcfccc.png)
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#101335 (rustdoc: remove old CSS selector that causes weird spacing) - rust-lang#101347 (ffx component run should provide a collection) - rust-lang#101364 (Shrink suggestion span of argument mismatch error) - rust-lang#101365 (remove redundant clones) Failed merges: - rust-lang#101349 (rustdoc: remove `.impl-items { flex-basis }` CSS, not in flex container) r? `@ghost` `@rustbot` modify labels: rollup
It was added with e08a84a (actually, it was called
.methods > .stability
at the time) and was directly nested that way.EDIT: It is technically reachable code still, but it seems wrong.
With the old CSS rule still present
https://notriddle.com/notriddle-rustdoc-test/weird-spacing/lib/struct.Foo.html
Version 2 (an older version of this PR)
https://notriddle.com/notriddle-rustdoc-test/normal-spacing-2/lib/struct.Foo.html
Version 3 (with alignment fix for mobile)
https://notriddle.com/notriddle-rustdoc-test/normal-spacing-3/lib/struct.Foo.html