diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-07-16 10:08:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-16 10:08:11 +0200 |
| commit | b19f37ca54709761948e3eaea3f86f5cd823e9d2 (patch) | |
| tree | a8f726384f3935f18e8d68a6db1af1b19fd37a5b /src/librustdoc/html/static/css/rustdoc.css | |
| parent | a547abe929b750971f5b909149a0be2a3ec7c366 (diff) | |
| parent | 868ffd03ed2b52d23eeaa9bf48857dde5083c18d (diff) | |
| download | rust-b19f37ca54709761948e3eaea3f86f5cd823e9d2.tar.gz rust-b19f37ca54709761948e3eaea3f86f5cd823e9d2.zip | |
Rollup merge of #87167 - GuillaumeGomez:sidebar-display-mobile, r=notriddle
Fix sidebar display on small devices Part of #87059. Instead of hiding the sidebar on small devices, we instead move it out of the viewport so that it remains "visible" to our text only users. Could you confirm it works for you `@ahicks92` and `@DataTriny` please? You can give it a try at [this URL](https://guillaume-gomez.fr/rustdoc-test/test_docs/index.html). r? `@notriddle`
Diffstat (limited to 'src/librustdoc/html/static/css/rustdoc.css')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 017ce0a494e..89dbc4d825f 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -1634,15 +1634,18 @@ details.undocumented[open] > summary::before { display: none; } + /* We do NOT hide this element so that alternative device readers still have this information + available. */ .sidebar-elems { position: fixed; z-index: 1; - left: 0; top: 45px; bottom: 0; + width: 246px; + /* We move the sidebar to the left by its own width so it doesn't appear. */ + left: -246px; overflow-y: auto; border-right: 1px solid; - display: none; } .sidebar > .block.version { @@ -1730,8 +1733,7 @@ details.undocumented[open] > summary::before { } .show-it { - display: block; - width: 246px; + left: 0; } .show-it > .block.items { |
