File tree 4 files changed +12
-20
lines changed
src/librustdoc/html/static/css 4 files changed +12
-20
lines changed Original file line number Diff line number Diff line change @@ -2527,9 +2527,12 @@ in src-script.js and main.js
2527
2527
z-index : 11 ;
2528
2528
/* Reduce height slightly to account for mobile topbar. */
2529
2529
height : calc (100vh - 45px );
2530
- width : 200px ;
2531
2530
/* resize indicator: hide this when on touch or mobile */
2532
2531
border-right : none;
2532
+ width : 100% ;
2533
+ }
2534
+ .sidebar-elems .block li a {
2535
+ white-space : wrap;
2533
2536
}
2534
2537
2535
2538
/* The source view uses a different design for the sidebar toggle, and doesn't have a topbar,
Original file line number Diff line number Diff line change @@ -244,10 +244,6 @@ click: ".sidebar-menu-toggle"
244
244
assert: "//*[@class='sidebar shown']"
245
245
assert-count: ("//*[@class='tooltip popover']", 0)
246
246
assert-false: "#method\.create_an_iterator_from_read .tooltip:focus"
247
- // Clicking a notable trait tooltip popover should close the sidebar.
248
- click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
249
- assert-count: ("//*[@class='tooltip popover']", 1)
250
- assert-false: "//*[@class='sidebar shown']"
251
247
252
248
// Also check the focus handling for the settings button.
253
249
set-window-size: (1100, 600)
Original file line number Diff line number Diff line change @@ -68,16 +68,3 @@ assert-css: ("#settings-menu .popover", {"display": "block"})
68
68
click: ".sidebar-menu-toggle"
69
69
assert: "//*[@class='sidebar shown']"
70
70
assert-css: ("#settings-menu .popover", {"display": "none"})
71
- // Opening the settings popover should close the sidebar.
72
- click: "#settings-menu a"
73
- assert-css: ("#settings-menu .popover", {"display": "block"})
74
- assert-false: "//*[@class='sidebar shown']"
75
-
76
- // Opening the settings popover at start (which async loads stuff) should also close.
77
- reload:
78
- click: ".sidebar-menu-toggle"
79
- assert: "//*[@class='sidebar shown']"
80
- assert-false: "#settings-menu .popover"
81
- click: "#settings-menu a"
82
- assert-false: "//*[@class='sidebar shown']"
83
- wait-for: "#settings-menu .popover"
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ assert-css: (
32
32
{"display": "block"}
33
33
)
34
34
35
- // Click elsewhere.
36
- click: "body "
35
+ // Click the toggle to close it
36
+ click: ".sidebar-menu-toggle "
37
37
assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
38
38
39
39
// Open the sidebar menu, and make sure pressing Escape closes it.
@@ -57,6 +57,8 @@ scroll-to: ".block.keyword li:nth-child(1)"
57
57
compare-elements-position-near: (".block.keyword li:nth-child(1)", ".mobile-topbar", {"y": 544})
58
58
59
59
// Now checking the background color of the sidebar.
60
+ // Close the sidebar menu.
61
+ press-key: "Escape"
60
62
show-text: true
61
63
62
64
define-function: (
@@ -72,6 +74,10 @@ define-function: (
72
74
"background-color": |background|,
73
75
"color": |color|,
74
76
})
77
+ // Make sure the sidebar is full width
78
+ compare-elements-size: (".sidebar", "body", ["width"])
79
+ // Close the sidebar menu.
80
+ press-key: "Escape"
75
81
},
76
82
)
77
83
You can’t perform that action at this time.
0 commit comments