Skip to content

Commit

Permalink
Improve file sidebar in source code view page on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Apr 30, 2019
1 parent f843ad6 commit 67ca448
Showing 1 changed file with 45 additions and 33 deletions.
78 changes: 45 additions & 33 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,39 @@ h4 > .important-traits {
margin: 5px 0;
}

#sidebar-toggle {
position: fixed;
top: 30px;
left: 300px;
z-index: 10;
padding: 3px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
cursor: pointer;
font-weight: bold;
transition: left .5s;
font-size: 1.2em;
border: 1px solid;
border-left: 0;
}
#source-sidebar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
width: 300px;
z-index: 1;
overflow: auto;
transition: left .5s;
border-right: 1px solid;
}
#source-sidebar > .title {
font-size: 1.5em;
text-align: center;
border-bottom: 1px solid;
margin-bottom: 6px;
}

@media (max-width: 700px) {
h4 > .important-traits {
position: absolute;
Expand Down Expand Up @@ -1307,6 +1340,18 @@ h4 > .important-traits {
#all-types {
margin: 10px;
}

#sidebar-toggle {
top: 100px;
width: 30px;
font-size: 1.5rem;
text-align: center;
padding: 0;
}

#source-sidebar {
z-index: 11;
}
}


Expand Down Expand Up @@ -1516,39 +1561,6 @@ kbd {
margin-bottom: 1em;
}

#sidebar-toggle {
position: fixed;
top: 30px;
left: 300px;
z-index: 10;
padding: 3px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
cursor: pointer;
font-weight: bold;
transition: left .5s;
font-size: 1.2em;
border: 1px solid;
border-left: 0;
}
#source-sidebar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
width: 300px;
z-index: 1;
overflow: auto;
transition: left .5s;
border-right: 1px solid;
}
#source-sidebar > .title {
font-size: 1.5em;
text-align: center;
border-bottom: 1px solid;
margin-bottom: 6px;
}

div.children {
padding-left: 27px;
display: none;
Expand Down

0 comments on commit 67ca448

Please sign in to comment.