about summary refs log tree commit diff
path: root/src/librustdoc/html/static/rustdoc.css
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-10-22 09:45:37 +0900
committerGitHub <noreply@github.com>2020-10-22 09:45:37 +0900
commitd9cf1f20508fd27fb3bd79df3fd2a3ba8d141b05 (patch)
treeb8158d1b4fef0a604cfae681a09433f8e492b5e4 /src/librustdoc/html/static/rustdoc.css
parent004a3aa49b4204af3ded62e27d07a323d9921880 (diff)
parent4e2c59a970695b2809a0f68f2ffe415ebdb04913 (diff)
downloadrust-d9cf1f20508fd27fb3bd79df3fd2a3ba8d141b05.tar.gz
rust-d9cf1f20508fd27fb3bd79df3fd2a3ba8d141b05.zip
Rollup merge of #78084 - GuillaumeGomez:improve-mobile-display, r=jyn514,Nemo157
Greatly improve display for small mobile devices screens

Fixes #78014.

The biggest change being the "search bar". Instead of having everything on one line, I decided to move the search input on its own:

![Screenshot from 2020-10-18 21-54-26](https://user-images.githubusercontent.com/3050060/96378530-c863a800-118c-11eb-8e82-a43fce312b5b.png)

Another change is that now, we "break words" in the listing so that they don't grow too big:

![Screenshot from 2020-10-18 21-57-17](https://user-images.githubusercontent.com/3050060/96378555-ffd25480-118c-11eb-8a71-8f116c7edd93.png)

r? @jyn514
Diffstat (limited to 'src/librustdoc/html/static/rustdoc.css')
-rw-r--r--src/librustdoc/html/static/rustdoc.css35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index d7e9496205a..7eccb09b073 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -1568,6 +1568,41 @@ h4 > .notable-traits {
 	#titles, #titles > div {
 		height: 73px;
 	}
+
+	#main > table:not(.table-display) td {
+		word-break: break-word;
+		min-width: 10%;
+	}
+
+	.search-container > div {
+		display: block;
+		width: calc(100% - 37px);
+	}
+
+	#crate-search {
+		width: 100%;
+		border-radius: 4px;
+		border: 0;
+	}
+
+	#crate-search + .search-input {
+		width: calc(100% + 71px);
+		margin-left: -36px;
+	}
+
+	#theme-picker, #settings-menu {
+		padding: 5px;
+		width: 31px;
+		height: 31px;
+	}
+
+	#theme-picker {
+		margin-top: -2px;
+	}
+
+	#settings-menu {
+		top: 7px;
+	}
 }
 
 h3.notable {