diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-04-29 23:24:09 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-04-30 10:03:38 +0200 |
| commit | 67ca448dac4ccf189e2c708be3f3569b70ee2698 (patch) | |
| tree | e8ddcd2a2676043072eb0a21d9a15d7132456b45 /src/librustdoc/html/static/rustdoc.css | |
| parent | f843ad60ef5a78d8b4da85c5007d3ecac229f1a8 (diff) | |
| download | rust-67ca448dac4ccf189e2c708be3f3569b70ee2698.tar.gz rust-67ca448dac4ccf189e2c708be3f3569b70ee2698.zip | |
Improve file sidebar in source code view page on mobile
Diffstat (limited to 'src/librustdoc/html/static/rustdoc.css')
| -rw-r--r-- | src/librustdoc/html/static/rustdoc.css | 78 |
1 files changed, 45 insertions, 33 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 358549117a3..82ef6a410a3 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/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; |
