diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2021-02-01 14:29:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-01 14:29:42 +0100 |
| commit | ccc5a853076837fcca65b51c1ade232a8fcb4604 (patch) | |
| tree | ad770640b1cc27cf16b99fffea13c36f31b921db /src/librustdoc/html | |
| parent | 82b00ec606df7d1dc3237cc05f8431ae43f76b03 (diff) | |
| parent | be9b112a5a1b6cb4eec2bf3feed73516b70825b5 (diff) | |
| download | rust-ccc5a853076837fcca65b51c1ade232a8fcb4604.tar.gz rust-ccc5a853076837fcca65b51c1ade232a8fcb4604.zip | |
Rollup merge of #81592 - GuillaumeGomez:rustdoc-ui-fixes, r=Nemo157
Rustdoc UI fixes The first commit fixes this bug (I couldn't figure out why we were setting the width manually and it works as expected without so...):  The second commit fixes a small bug. On tablets or computer with very little width, the search section goes "over" the search input, making it impossible to click on the search input:  The third and last commit fixes two bugs that you can see in this screenshot:  The wheel is going over the search input and the search tab is going under the search results text. The bug was fixed by simply switching to "mobile mode" at a bigger width:  cc ```@pickfire``` r? ```@Nemo157```
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/static/main.js | 9 | ||||
| -rw-r--r-- | src/librustdoc/html/static/rustdoc.css | 4 |
2 files changed, 2 insertions, 11 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 7e613220f2d..4dbe7a37fcd 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -1695,15 +1695,6 @@ function defocusSearchBar() { search.innerHTML = output; showSearchResults(search); - var tds = search.getElementsByTagName("td"); - var td_width = 0; - if (tds.length > 0) { - td_width = tds[0].offsetWidth; - } - var width = search.offsetWidth - 40 - td_width; - onEachLazy(search.getElementsByClassName("desc"), function(e) { - e.style.width = width + "px"; - }); initSearchNav(); var elems = document.getElementById("titles").childNodes; elems[0].onclick = function() { printTab(0); }; diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index cb16dc588d3..d50fda278bd 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -1425,7 +1425,7 @@ h4 > .notable-traits { margin-left: 0px; } - #main { + #main, #search { margin-top: 45px; padding: 0; } @@ -1579,7 +1579,7 @@ h4 > .notable-traits { } } -@media (max-width: 416px) { +@media (max-width: 464px) { #titles, #titles > button { height: 73px; } |
