Improve click behavior of the source code mobile full-screen "sidebar"
On desktop, if you open the source code sidebar, it stays open even when you move from page to page. It used to do the same thing on mobile, but I think that's stupid. Since the file list fills the entire screen on mobile, and you can't really do anything with the currently selected file other than dismiss the "sidebar" to look at it, it's safe to assume that anybody who clicks a file in that list probably wants the list to go away so they can see it.
This commit is contained in:
parent
5b9775fe17
commit
83f22885ae
4 changed files with 46 additions and 2 deletions
|
@ -9,6 +9,11 @@ const darkThemes = ["dark", "ayu"];
|
|||
window.currentTheme = document.getElementById("themeStyle");
|
||||
window.mainTheme = document.getElementById("mainThemeStyle");
|
||||
|
||||
// WARNING: RUSTDOC_MOBILE_BREAKPOINT MEDIA QUERY
|
||||
// If you update this line, then you also need to update the two media queries with the same
|
||||
// warning in rustdoc.css
|
||||
window.RUSTDOC_MOBILE_BREAKPOINT = 701;
|
||||
|
||||
const settingsDataset = (function() {
|
||||
const settingsElement = document.getElementById("default-settings");
|
||||
if (settingsElement === null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue