diff options
| author | cynecx <me@cynecx.net> | 2021-10-10 19:08:08 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-11-29 11:07:18 +0100 |
| commit | 07e3f998b1ceb4b8d2a7992782e60f5e776aa114 (patch) | |
| tree | dc7f54bca92053b5585b4a5cae30a4ef43558524 /src/librustdoc/html/static/css | |
| parent | 1e98fb10274ea0245f865ddb1e295e454382000b (diff) | |
| download | rust-07e3f998b1ceb4b8d2a7992782e60f5e776aa114.tar.gz rust-07e3f998b1ceb4b8d2a7992782e60f5e776aa114.zip | |
rustdoc: merge source sidebar into main sidebar
Diffstat (limited to 'src/librustdoc/html/static/css')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 63 | ||||
| -rw-r--r-- | src/librustdoc/html/static/css/themes/dark.css | 2 |
2 files changed, 32 insertions, 33 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 9cd05a7d6f1..a99507a215d 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -311,7 +311,6 @@ li { } .source .content { - margin-top: 50px; max-width: none; overflow: visible; margin-left: 0px; @@ -335,7 +334,15 @@ nav.sub { } .source .sidebar { - display: none; + width: unset; + min-width: 0px; + max-width: 300px; + flex-grow: 0; + flex-shrink: 0; + flex-basis: auto; + border-right: 1px solid; + transition: width .5s; + overflow-x: hidden; } /* Improve the scrollbar display on firefox */ @@ -367,18 +374,6 @@ nav.sub { display: none !important; } -.logo-source { - display: none; -} - -.source .logo-source { - display: block; - position: absolute; - top: 0; - left: 0; - width: 200px; -} - .logo-container { height: 100px; width: 100px; @@ -742,7 +737,7 @@ nav:not(.sidebar) { margin-bottom: 25px; } .source nav:not(.sidebar).sub { - margin-left: 230px; + margin-left: 32px; } nav.main { padding: 20px 0; @@ -1367,15 +1362,9 @@ pre.rust { 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; @@ -1696,7 +1685,7 @@ details.rustdoc-toggle[open] > summary.hideme::after { flex-direction: column; } - .rustdoc > .sidebar { + .rustdoc:not(.source) > .sidebar { width: 100%; height: 45px; min-height: 40px; @@ -1707,6 +1696,14 @@ details.rustdoc-toggle[open] > summary.hideme::after { z-index: 11; } + .rustdoc.source > .sidebar { + position: fixed; + top: 0; + left: 0; + margin: 0; + z-index: 11; + } + .sidebar > .location { float: right; margin: 0px; @@ -1722,13 +1719,19 @@ details.rustdoc-toggle[open] > summary.hideme::after { padding: 0; } - .sidebar .logo-container { + .rustdoc.source .sidebar .logo-container { + width: 100%; + height: 45px; + margin: 0 auto; + } + + .rustdoc:not(.source) .sidebar .logo-container { width: 35px; - height: 35px; - margin-top: 5px; - margin-bottom: 5px; - float: left; - margin-left: 50px; + height: 35px; + margin-top: 5px; + margin-bottom: 5px; + float: left; + margin-left: 50px; } .sidebar .logo-container > img { @@ -1944,10 +1947,6 @@ details.rustdoc-toggle[open] > summary.hideme::after { .search-results div.desc, .search-results .result-description, .item-right { padding-left: 2em; } - - .source .logo-source { - display: none; - } } @media print { diff --git a/src/librustdoc/html/static/css/themes/dark.css b/src/librustdoc/html/static/css/themes/dark.css index 8caf8a05d50..3e5ec748397 100644 --- a/src/librustdoc/html/static/css/themes/dark.css +++ b/src/librustdoc/html/static/css/themes/dark.css @@ -66,7 +66,7 @@ pre, .rustdoc.source .example-wrap { } .source .sidebar { - background-color: #353535; + background-color: #565656; } .sidebar .location { |
