-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #127474 - tesuji:foldable-inline-derefs, r=t-rustdoc
doc: Make block of inline Deref methods foldable After: ![image](https://github.com/rust-lang/rust/assets/15225902/3e8ab320-dbf7-436f-9be0-d0ef82664663) Before: ![image](https://github.com/rust-lang/rust/assets/15225902/f6f7635d-d4c3-437e-a2d9-147726287b05) Fix #127470. Current status: - [x] Bug when hovering over title "Methods from ...": The anchor sign $ overlaps with `[-]`: #127474 (comment) => Fixed by #127474 (comment)
- Loading branch information
Showing
4 changed files
with
63 additions
and
4 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// This test ensures that several clickable items actually have the pointer cursor. | ||
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Derefer.html" | ||
|
||
assert-text: (".big-toggle summary", "Methods from Deref<Target = str>§") | ||
// We ensure it doesn't go over `§`. | ||
assert-css: (".big-toggle summary::before", { | ||
"left": "-34px", | ||
"top": "9px", | ||
}) | ||
// It should NOT have the same X or Y position as the other toggles. | ||
compare-elements-position-false: ( | ||
".big-toggle summary::before", | ||
".method-toggle summary::before", | ||
["x", "y"], | ||
) | ||
|
||
// We now check that if we're in mobile mode, it gets back to its original X position. | ||
set-window-size: (600, 600) | ||
assert-css: (".big-toggle summary::before", { | ||
"left": "-11px", | ||
"top": "9px", | ||
}) | ||
// It should have the same X position as the other toggles. | ||
compare-elements-position: (".big-toggle summary::before", ".method-toggle summary::before", ["x"]) | ||
// But still shouldn't have the same Y position. | ||
compare-elements-position-false: ( | ||
".big-toggle summary::before", | ||
".method-toggle summary::before", | ||
["y"], | ||
) |
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