-
Notifications
You must be signed in to change notification settings - Fork 13.4k
rustdoc: simplify the codeblock tooltip #101600
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @jsha (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
24e1a38
to
d734633
Compare
This comment has been minimized.
This comment has been minimized.
d734633
to
ea452ab
Compare
A change occurred in the Ayu theme. cc @Cldfire Some changes occurred in HTML/CSS themes. Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @Folyd, @jsha |
Please rebase. Also I was about to work on simplifying the tooltips but differently. I think this PR and mine will be complementary. Interesting how things turn up. |
ea452ab
to
cbcb74e
Compare
This commit moves the tooltip into example-wrap, simplifying allowing several overly-complex things to be fixed: * The mousover javascript can be removed, because hovering example-wrap can style the tooltip inside. * The sibling selecor can be removed, because hovering the tooltip also hovers the wrapper, which can hover the codeblock itself. * The relative positioning of the `<li>` tag, which was added in e861efd to fix the positioning of the code tooltip, can now be removed, because example-wrap itself already has relative positioning.
@GuillaumeGomez okay, it’s rebased |
Looks good to me, thanks! r=me once CI pass |
@bors r+ rollup |
…llaumeGomez Rollup of 5 pull requests Successful merges: - rust-lang#101475 (Use futex-based locks and thread parker on Hermit) - rust-lang#101492 (Suggest adding array lengths to references to arrays if possible) - rust-lang#101495 (Compile spin_loop_hint as pause on x86 even without sse2 enabled) - rust-lang#101529 (Fix the example code and doctest for Formatter::sign_plus) - rust-lang#101600 (rustdoc: simplify the codeblock tooltip) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…r=notriddle Simplify codeblock and their associated tooltip It is based on rust-lang#101600 so it needs to wait for this one to be merged first. This PR does two things: * Remove CSS class duplication by setting CSS classes such as `compile_fail` directly on the `div` wrapping both the codeblock and the tooltip. * Simplify DOM: no need to wrap the tooltip into a `<div>`, it can work just as well without it. You can test it [here](https://rustdoc.crud.net/imperio/codeblock-tooltip/std/string/struct.String.html#deref). r? `@notriddle`
…notriddle Simplify codeblock and their associated tooltip It is based on rust-lang#101600 so it needs to wait for this one to be merged first. This PR does two things: * Remove CSS class duplication by setting CSS classes such as `compile_fail` directly on the `div` wrapping both the codeblock and the tooltip. * Simplify DOM: no need to wrap the tooltip into a `<div>`, it can work just as well without it. You can test it [here](https://rustdoc.crud.net/imperio/codeblock-tooltip/std/string/struct.String.html#deref). r? `@notriddle`
This PR moves the tooltip into example-wrap, simplifying several overly-complex aspects of how these tooltips work:
<li>
tag, which was added in e861efd to fix the positioning of the code tooltip, can now be removed, because example-wrap itself already has relative positioning.