diff options
| author | cynecx <me@cynecx.net> | 2021-10-24 20:03:13 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-11-29 11:08:51 +0100 |
| commit | cad0fce2053d52b7ba04c458f4c124c8b5c6141e (patch) | |
| tree | 725530812be21c6193357dbd9ca0910dcbd2a2d8 | |
| parent | e2467f2c4561b28b7bf211e203820a9b5901afd9 (diff) | |
| download | rust-cad0fce2053d52b7ba04c458f4c124c8b5c6141e.tar.gz rust-cad0fce2053d52b7ba04c458f4c124c8b5c6141e.zip | |
rustdoc: don't use overflow for main, instead make the sidebar sticky
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 0ba082b1cd7..b5c90db9246 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -257,8 +257,7 @@ main { position: relative; flex-grow: 1; padding: 10px 15px 40px 45px; - height: 100vh; - overflow-y: auto; + min-width: 0; } .source main { @@ -325,12 +324,13 @@ nav.sub { .sidebar { width: 200px; overflow-y: scroll; + position: sticky; + min-width: 200px; + height: 100vh; } .rustdoc.source .sidebar { - overflow-y: auto; - min-width: 200px; - height: 100vh; + overflow: auto; } .source .sidebar { @@ -1675,10 +1675,8 @@ details.rustdoc-toggle[open] > summary.hideme::after { } main { - height: auto; padding-left: 15px; padding-top: 0px; - overflow-y: visible; } .rustdoc { @@ -1704,6 +1702,15 @@ details.rustdoc-toggle[open] > summary.hideme::after { z-index: 11; } + .sidebar.mobile { + position: sticky !important; + top: 0; + left: 0; + width: 100%; + margin-left: 0; + background-color: rgba(0,0,0,0); + } + .sidebar > .location { float: right; margin: 0px; @@ -1839,15 +1846,6 @@ details.rustdoc-toggle[open] > summary.hideme::after { height: 50px; } - .sidebar.mobile { - position: sticky; - top: 0; - left: 0; - width: 100%; - margin-left: 0; - background-color: rgba(0,0,0,0); - } - .show-it, .sidebar-elems:focus-within { z-index: 2; left: 0; |
