1
Fork 0

rustdoc: small fixes to mobile navigation

- Make sure the mobile-topbar doesn't overflow its height if the user
  sets a bigger font.

- Make sure the sidebar can be scrolled all the way to the bottom by
  shortening it to accommodate the mobile-topbar.

- Make the item name in the mobile-topbar clickable to go to the top of
  the page.

- Remove excess padding sidebar in mobile mode.
This commit is contained in:
Jacob Hoffman-Andrews 2022-01-21 17:44:54 -08:00
parent a00e130dae
commit a998a37476
8 changed files with 26 additions and 4 deletions

View file

@ -72,7 +72,7 @@ function resourcePath(basename, extension) {
var mobileLocationTitle = document.querySelector(".mobile-topbar h2.location");
var locationTitle = document.querySelector(".sidebar h2.location");
if (mobileLocationTitle && locationTitle) {
mobileLocationTitle.innerText = locationTitle.innerText;
mobileLocationTitle.innerHTML = locationTitle.innerHTML;
}
}
}());