about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2022-07-26 07:14:52 +0900
committerGitHub <noreply@github.com>2022-07-26 07:14:52 +0900
commite58bfacd90bea9fab8bdbd9cf6129290937fed63 (patch)
treed53dea1dc6e636b9f2f50a094b50969950b20030 /src
parentb37b39db82e2c5234f2e9cfe3ef04144d74f40fb (diff)
parent8db7249f26ef4265ae58bb77d8f3559b723134c9 (diff)
downloadrust-e58bfacd90bea9fab8bdbd9cf6129290937fed63.tar.gz
rust-e58bfacd90bea9fab8bdbd9cf6129290937fed63.zip
Rollup merge of #99713 - GuillaumeGomez:fix-sidebar-background, r=notriddle
Fix sidebar background

Fixes #99691.

cc `@jsha`
r? `@notriddle`
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)"})