Skip to content

Commit e58bfac

Browse files
authored
Rollup merge of #99713 - GuillaumeGomez:fix-sidebar-background, r=notriddle
Fix sidebar background Fixes #99691. cc `@jsha` r? `@notriddle`
2 parents b37b39d + 8db7249 commit e58bfac

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

src/librustdoc/html/static/css/rustdoc.css

-1
Original file line numberDiff line numberDiff line change
@@ -1855,7 +1855,6 @@ in storage.js plus the media query with (min-width: 701px)
18551855
the sidebar stays visible for screen readers, which is useful for navigation. */
18561856
left: -1000px;
18571857
margin-left: 0;
1858-
background-color: rgba(0,0,0,0);
18591858
margin: 0;
18601859
padding: 0;
18611860
z-index: 11;

src/test/rustdoc-gui/sidebar-mobile.goml

+22
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,25 @@ assert-position: ("#method\.must_use", {"y": 45})
4040
click: ".sidebar-menu-toggle"
4141
scroll-to: ".block.keyword li:nth-child(1)"
4242
compare-elements-position-near: (".block.keyword li:nth-child(1)", ".mobile-topbar", {"y": 543})
43+
44+
// Now checking the background color of the sidebar.
45+
local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "dark"}
46+
reload:
47+
48+
// Open the sidebar menu.
49+
click: ".sidebar-menu-toggle"
50+
assert-css: (".sidebar", {"background-color": "rgb(80, 80, 80)"})
51+
52+
local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "ayu"}
53+
reload:
54+
55+
// Open the sidebar menu.
56+
click: ".sidebar-menu-toggle"
57+
assert-css: (".sidebar", {"background-color": "rgb(20, 25, 31)"})
58+
59+
local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "light"}
60+
reload:
61+
62+
// Open the sidebar menu.
63+
click: ".sidebar-menu-toggle"
64+
assert-css: (".sidebar", {"background-color": "rgb(245, 245, 245)"})

0 commit comments

Comments
 (0)