mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
rustdoc: remove no-op CSS .rustdoc.source .sidebar { width: 0 }
This CSS was added indc2c972334
, before6a5f8b1aef
when the sidebars were merged. Now that they are merged, the source sidebar is being pushed off-screen anyway, so giving it zero width doesn't do much.
This commit is contained in:
parent
afe8c4537c
commit
16a3c8032e
@ -1598,14 +1598,10 @@ in storage.js
|
|||||||
|
|
||||||
.sidebar.shown,
|
.sidebar.shown,
|
||||||
.source-sidebar-expanded .source .sidebar,
|
.source-sidebar-expanded .source .sidebar,
|
||||||
.sidebar:focus-within {
|
.rustdoc:not(.source) .sidebar:focus-within {
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rustdoc.source > .sidebar {
|
|
||||||
width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobile-topbar h2 {
|
.mobile-topbar h2 {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
margin: auto 0.5em auto auto;
|
margin: auto 0.5em auto auto;
|
||||||
|
@ -171,15 +171,15 @@ assert-css: (
|
|||||||
|
|
||||||
// We now check that the scroll position is kept when opening the sidebar.
|
// We now check that the scroll position is kept when opening the sidebar.
|
||||||
click: "#src-sidebar-toggle"
|
click: "#src-sidebar-toggle"
|
||||||
wait-for-css: (".sidebar", {"width": "0px"})
|
wait-for-css: (".sidebar", {"left": "-1000px"})
|
||||||
// We scroll to line 117 to change the scroll position.
|
// We scroll to line 117 to change the scroll position.
|
||||||
scroll-to: '//*[@id="117"]'
|
scroll-to: '//*[@id="117"]'
|
||||||
assert-window-property: {"pageYOffset": "2542"}
|
assert-window-property: {"pageYOffset": "2542"}
|
||||||
// Expanding the sidebar...
|
// Expanding the sidebar...
|
||||||
click: "#src-sidebar-toggle"
|
click: "#src-sidebar-toggle"
|
||||||
wait-for-css: (".sidebar", {"width": "500px"})
|
wait-for-css: (".sidebar", {"left": "0px"})
|
||||||
click: "#src-sidebar-toggle"
|
click: "#src-sidebar-toggle"
|
||||||
wait-for-css: (".sidebar", {"width": "0px"})
|
wait-for-css: (".sidebar", {"left": "-1000px"})
|
||||||
// The "scrollTop" property should be the same.
|
// The "scrollTop" property should be the same.
|
||||||
assert-window-property: {"pageYOffset": "2542"}
|
assert-window-property: {"pageYOffset": "2542"}
|
||||||
|
|
||||||
|
@ -77,11 +77,11 @@ assert-count: ("//*[@id='source-sidebar']/details[not(text()='lib2') and not(@op
|
|||||||
|
|
||||||
// We now switch to mobile mode.
|
// We now switch to mobile mode.
|
||||||
size: (600, 600)
|
size: (600, 600)
|
||||||
wait-for-css: (".source-sidebar-expanded nav.sidebar", {"width": "600px"})
|
wait-for-css: (".source-sidebar-expanded nav.sidebar", {"left": "0px"})
|
||||||
// We collapse the sidebar.
|
// We collapse the sidebar.
|
||||||
click: (10, 10)
|
click: (10, 10)
|
||||||
// We check that the sidebar has the expected width (0).
|
// We check that the sidebar has been moved off-screen.
|
||||||
assert-css: ("nav.sidebar", {"width": "0px"})
|
assert-css: ("nav.sidebar", {"left": "-1000px"})
|
||||||
// We ensure that the class has been removed.
|
// We ensure that the class has been removed.
|
||||||
assert-false: ".source-sidebar-expanded"
|
assert-false: ".source-sidebar-expanded"
|
||||||
assert: "nav.sidebar"
|
assert: "nav.sidebar"
|
||||||
|
Loading…
Reference in New Issue
Block a user