about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-25 22:57:23 +0000
committerbors <bors@rust-lang.org>2022-07-25 22:57:23 +0000
commita86705942c4cfaaee60f2e7308ca2bca703a710f (patch)
tree133bd48f82d214929324a7e2337871b505adb8e5 /src
parent6dbae3ad19309bb541d9e76638e6aa4b5449f29a (diff)
parente58bfacd90bea9fab8bdbd9cf6129290937fed63 (diff)
downloadrust-a86705942c4cfaaee60f2e7308ca2bca703a710f.tar.gz
rust-a86705942c4cfaaee60f2e7308ca2bca703a710f.zip
Auto merge of #99735 - JohnTitor:rollup-d93jyr2, r=JohnTitor
Rollup of 9 pull requests

Successful merges:

 - #92390 (Constify a few `(Partial)Ord` impls)
 - #97077 (Simplify some code that depend on Deref)
 - #98710 (correct the output of a `capacity` method example)
 - #99084 (clarify how write_bytes can lead to UB due to invalid values)
 - #99178 (Lighten up const_prop_lint, reusing const_prop)
 - #99673 (don't ICE on invalid dyn calls)
 - #99703 (Expose size_hint() for TokenStream's iterator)
 - #99709 (`Inherited` always has `TypeckResults` available)
 - #99713 (Fix sidebar background)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css1
-rw-r--r--src/test/rustdoc-gui/sidebar-mobile.goml22
2 files changed, 22 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 70b7a47bcd5..02515771349 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -1855,7 +1855,6 @@ in storage.js plus the media query with (min-width: 701px)
 		   the sidebar stays visible for screen readers, which is useful for navigation. */
 		left: -1000px;
 		margin-left: 0;
-		background-color: rgba(0,0,0,0);
 		margin: 0;
 		padding: 0;
 		z-index: 11;
diff --git a/src/test/rustdoc-gui/sidebar-mobile.goml b/src/test/rustdoc-gui/sidebar-mobile.goml
index 79f18db8fc7..033c6578349 100644
--- a/src/test/rustdoc-gui/sidebar-mobile.goml
+++ b/src/test/rustdoc-gui/sidebar-mobile.goml
@@ -40,3 +40,25 @@ assert-position: ("#method\.must_use", {"y": 45})
 click: ".sidebar-menu-toggle"
 scroll-to: ".block.keyword li:nth-child(1)"
 compare-elements-position-near: (".block.keyword li:nth-child(1)", ".mobile-topbar", {"y": 543})
+
+// Now checking the background color of the sidebar.
+local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "dark"}
+reload:
+
+// Open the sidebar menu.
+click: ".sidebar-menu-toggle"
+assert-css: (".sidebar", {"background-color": "rgb(80, 80, 80)"})
+
+local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "ayu"}
+reload:
+
+// Open the sidebar menu.
+click: ".sidebar-menu-toggle"
+assert-css: (".sidebar", {"background-color": "rgb(20, 25, 31)"})
+
+local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "light"}
+reload:
+
+// Open the sidebar menu.
+click: ".sidebar-menu-toggle"
+assert-css: (".sidebar", {"background-color": "rgb(245, 245, 245)"})