feat(rustdoc): open sidebar menu when links inside it are focused#87180
Merged
bors merged 1 commit intorust-lang:masterfrom Jul 16, 2021
Merged
feat(rustdoc): open sidebar menu when links inside it are focused#87180bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
Some changes occurred in HTML/CSS/JS. |
Member
|
There is a much simpler way to do it. I tested locally with: $ git diff
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 9e3ad667531..8cddd85854a 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -1729,7 +1729,7 @@ details.undocumented[open] > summary::before {
width: calc(100% + 30px);
}
- .show-it {
+ .show-it, .sidebar-elems:focus-within {
+ z-index: 2;
left: 0;
}With this, no need for JS. :) The More information on Also, can you add a test in |
5af79dd to
10d00a3
Compare
Contributor
Author
|
@GuillaumeGomez Okay, that's done. |
Fixes rust-lang#87172 Based on rust-lang#87167 (which should be merged first) Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html Co-authored-by: Guillaume Gomez <guillaume.gomez@huawei.com>
10d00a3 to
0ea2980
Compare
Member
|
Awesome, thanks! Just waiting for CI then I r+. |
Member
|
@bors: r+ |
Collaborator
|
📌 Commit 0ea2980 has been approved by |
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Jul 16, 2021
…d-mobile, r=GuillaumeGomez feat(rustdoc): open sidebar menu when links inside it are focused Fixes rust-lang#87172 Based on rust-lang#87167 (which should be merged first) r? `@GuillaumeGomez` Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 16, 2021
…laumeGomez Rollup of 7 pull requests Successful merges: - rust-lang#87107 (Loop over all opaque types instead of looking at just the first one with the same DefId) - rust-lang#87158 (Suggest full enum variant for local modules) - rust-lang#87174 (Stabilize `[T; N]::map()`) - rust-lang#87179 (Mark `const_trait_impl` as active) - rust-lang#87180 (feat(rustdoc): open sidebar menu when links inside it are focused) - rust-lang#87188 (Add GUI test for auto-hide-trait-implementations setting) - rust-lang#87200 (TAIT: Infer all inference variables in opaque type substitutions via InferCx) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #87172
Based on #87167 (which should be merged first)
r? @GuillaumeGomez
Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html