Skip to content
Permalink
Browse files

Improve file sidebar in source code view page on mobile

  • Loading branch information...
GuillaumeGomez committed Apr 29, 2019
1 parent f843ad6 commit 67ca448dac4ccf189e2c708be3f3569b70ee2698
Showing with 45 additions and 33 deletions.
  1. +45 −33 src/librustdoc/html/static/rustdoc.css
@@ -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;
@@ -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;
}
}


@@ -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;

0 comments on commit 67ca448

Please sign in to comment.
You can’t perform that action at this time.