Skip to content

Commit 5326fc9

Browse files
committed
rustdoc: on mobile, make the sidebar full width and linewrap
this is because the mobile sidebar cannot be resized, unlike on desktop.
1 parent c79bbfa commit 5326fc9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2527,9 +2527,12 @@ in src-script.js and main.js
25272527
z-index: 11;
25282528
/* Reduce height slightly to account for mobile topbar. */
25292529
height: calc(100vh - 45px);
2530-
width: 200px;
25312530
/* resize indicator: hide this when on touch or mobile */
25322531
border-right: none;
2532+
width: 100%;
2533+
}
2534+
.sidebar-elems .block li a {
2535+
white-space: wrap;
25332536
}
25342537

25352538
/* The source view uses a different design for the sidebar toggle, and doesn't have a topbar,

0 commit comments

Comments
 (0)