about summary refs log tree commit diff
path: root/src/librustdoc/html/static/rustdoc.css
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-05-24 18:05:35 +0000
committerbors <bors@rust-lang.org>2021-05-24 18:05:35 +0000
commit126561cb31e8ebe1e2dd9dfd0d3ca621308dc56f (patch)
tree69c30c53a02c9ebb6eda076e7b432cce46e4654d /src/librustdoc/html/static/rustdoc.css
parentef0ec303fa5ff6fa5654c7ea94322f3f9881f6c2 (diff)
parent16fe40d3a38a197e5a2677332d26a916f6133408 (diff)
downloadrust-126561cb31e8ebe1e2dd9dfd0d3ca621308dc56f.tar.gz
rust-126561cb31e8ebe1e2dd9dfd0d3ca621308dc56f.zip
Auto merge of #85639 - GuillaumeGomez:rollup-modinsi, r=GuillaumeGomez
Rollup of 4 pull requests

Successful merges:

 - #85271 (Fix indentation in move keyword documentation)
 - #85551 (Fix search results display)
 - #85621 (Restore sans-serif font for module items.)
 - #85628 (Replace more "NULL" with "null")

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/librustdoc/html/static/rustdoc.css')
-rw-r--r--src/librustdoc/html/static/rustdoc.css38
1 files changed, 33 insertions, 5 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 9c5e3e8bfb2..bd03ab85c2c 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -145,6 +145,7 @@ h4.type.trait-impl, h4.associatedconstant.trait-impl, h4.associatedtype.trait-im
 
 h1, h2, h3, h4,
 .sidebar, a.source, .search-input, .search-results .result-name,
+.content table td:first-child > a,
 div.item-list .out-of-band,
 #source-sidebar, #sidebar-toggle,
 details.rustdoc-toggle > summary::before,
@@ -759,25 +760,40 @@ a {
 
 .search-results.active {
 	display: block;
+	/* prevent overhanging tabs from moving the first result */
+	clear: both;
 }
 
-.search-results .desc {
+.search-results .desc > span {
 	white-space: nowrap;
 	text-overflow: ellipsis;
 	overflow: hidden;
 	display: block;
 }
 
-.search-results a {
+.search-results > a {
+	display: block;
+	width: 100%;
 	/* A little margin ensures the browser's outlining of focused links has room to display. */
 	margin-left: 2px;
 	margin-right: 2px;
-	display: block;
+	border-bottom: 1px solid #aaa3;
+}
+
+.search-results > a > div {
+	display: flex;
+	flex-flow: row wrap;
 }
 
-.result-name {
+.search-results .result-name, .search-results div.desc, .search-results .result-description {
 	width: 50%;
-	float: left;
+}
+.search-results .result-name {
+	padding-right: 1em;
+}
+
+.search-results .result-name > span {
+	display: inline-block;
 }
 
 .result-name span.primitive::after {
@@ -1733,6 +1749,18 @@ details.undocumented[open] > summary::before {
 	.search-container > div {
 		width: calc(100% - 32px);
 	}
+
+	/* Display an alternating layout on tablets and phones */
+	.search-results > a {
+		border-bottom: 1px solid #aaa9;
+		padding: 5px 0px;
+	}
+	.search-results .result-name, .search-results div.desc, .search-results .result-description {
+		width: 100%;
+	}
+	.search-results div.desc, .search-results .result-description {
+		padding-left: 2em;
+	}
 }
 
 @media print {