Improve display of crate name when hovered#117906
Conversation
|
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @jsha |
|
It was done that way so that it would align with the search bar. How does this commit address that? |
|
Also if using more screen space is okay, I can simply increase |
|
So what do you want to do here @notriddle ? |
|
I’ll approve if @fmease thinks it looks good. |
|
Oddly enough, having built rustdoc locally with this patch applied, it looks totally different from Guillaume's screenshots here: #117906 (comment). The backdrop still aligns with the the search bar: And I've found a slight debatable regression (which you can hopefully reproduce):
Not blocking though. So I can neither approve nor disapprove atm ^^' Mozilla Firefox 121.0 |
|
This PR is a bit old. I'm going to rebase and update whatever needs to be updated then I'll post new screenshots and an online demo. |
1a9544e to
96e6cfa
Compare
|
Updated screenshots, code and added link to online docs so you can test it yourself. :) |
|
CC #120471, could be addressed in this PR, too, or in a follow-up. In the latter case, r=notriddle,fmease on this PR I suppose. |
|
Different case. I'll take a look later on. Thank you both for the reviews! @bors r=fmease,notriddle |
…llaumeGomez Rollup of 11 pull requests Successful merges: - rust-lang#117906 (Improve display of crate name when hovered) - rust-lang#118533 (Suppress unhelpful diagnostics for unresolved top level attributes) - rust-lang#120293 (Deduplicate more sized errors on call exprs) - rust-lang#120295 (Remove `raw_os_nonzero` feature.) - rust-lang#120310 (adapt test for v0 symbol mangling) - rust-lang#120342 (Remove various `has_errors` or `err_count` uses) - rust-lang#120434 (Revert outdated version of "Add the wasm32-wasi-preview2 target") - rust-lang#120445 (Fix some `Arc` allocator leaks) - rust-lang#120475 (Improve error message when `cargo build` is used to build the compiler) - rust-lang#120476 (Remove some unnecessary check logic for lang items in HIR typeck) - rust-lang#120485 (add missing potential_query_instability for keys and values in hashmap) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#117906 - GuillaumeGomez:improve-crate-name-hover, r=fmease,notriddle Improve display of crate name when hovered Currently when we hover the crate name, the background is stuck to the version and to the logo (when there is one):   I find it very unpleasant so I reduced the padding size and increased the margin (left and top) to keep the same positioning but not making it stuck anymore:   [online docs](https://rustdoc.crud.net/imperio/improve-crate-name-hover/std/index.html) r? `@notriddle`





Currently when we hover the crate name, the background is stuck to the version and to the logo (when there is one):
I find it very unpleasant so I reduced the padding size and increased the margin (left and top) to keep the same positioning but not making it stuck anymore:
online docs
r? @notriddle