Skip to content

Commit e722a08

Browse files
GuillaumeGomezpietroalbini
authored andcommitted
Do not hide the sidebar on mobile, move it outside of the viewport instead
1 parent 26210a3 commit e722a08

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/librustdoc/html/static/rustdoc.css

+6-4
Original file line numberDiff line numberDiff line change
@@ -1577,15 +1577,18 @@ details.undocumented[open] > summary::before {
15771577
display: none;
15781578
}
15791579

1580+
/* We do NOT hide this element so that alternative device readers still have this information
1581+
available. */
15801582
.sidebar-elems {
15811583
position: fixed;
15821584
z-index: 1;
1583-
left: 0;
15841585
top: 45px;
15851586
bottom: 0;
1587+
width: 246px;
1588+
/* We move the sidebar to the left by its own width so it doesn't appear. */
1589+
left: -246px;
15861590
overflow-y: auto;
15871591
border-right: 1px solid;
1588-
display: none;
15891592
}
15901593

15911594
.sidebar > .block.version {
@@ -1662,8 +1665,7 @@ details.undocumented[open] > summary::before {
16621665
}
16631666

16641667
.show-it {
1665-
display: block;
1666-
width: 246px;
1668+
left: 0;
16671669
}
16681670

16691671
.show-it > .block.items {

0 commit comments

Comments
 (0)