summary refs log tree commit diff
path: root/src/librustdoc/html/static/css
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-07-05 16:04:33 +0530
committerGitHub <noreply@github.com>2022-07-05 16:04:33 +0530
commitc2613a5c7fc1e6582eae12ea24da7bf08c16ad43 (patch)
treeecef41f267a6a4abe3aabeb2b3fffa1845847295 /src/librustdoc/html/static/css
parent291df97faec6e009a95c658cf6d2840088a85fa0 (diff)
parent6e2c49f7eddb4c09e17653760965b69a3dc97fb0 (diff)
downloadrust-c2613a5c7fc1e6582eae12ea24da7bf08c16ad43.tar.gz
rust-c2613a5c7fc1e6582eae12ea24da7bf08c16ad43.zip
Rollup merge of #98776 - notriddle:notriddle/mobile-sidebar-auto-close, r=GuillaumeGomez
rustdoc: 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.

Split out separately from #98772
Diffstat (limited to 'src/librustdoc/html/static/css')
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 8d99b85bebe..b3dc60d880b 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -1739,6 +1739,11 @@ details.rustdoc-toggle[open] > summary.hideme::after {
 
 /* Media Queries */
 
+/*
+WARNING: RUSTDOC_MOBILE_BREAKPOINT MEDIA QUERY;
+If you update this line, then you also need to update the line with the same warning
+in storage.js plus the media query with (max-width: 700px)
+*/
 @media (min-width: 701px) {
 	/* In case there is no documentation before a code block, we need to add some margin at the top
 	to prevent an overlay between the "collapse toggle" and the information tooltip.
@@ -1759,6 +1764,11 @@ details.rustdoc-toggle[open] > summary.hideme::after {
 	}
 }
 
+/*
+WARNING: RUSTDOC_MOBILE_BREAKPOINT MEDIA QUERY
+If you update this line, then you also need to update the line with the same warning
+in storage.js plus the media query with (min-width: 701px)
+*/
 @media (max-width: 700px) {
 	/* When linking to an item with an `id` (for instance, by clicking a link in the sidebar,
 	   or visiting a URL with a fragment like `#method.new`, we don't want the item to be obscured