about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-05-22 16:05:20 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2021-05-22 16:05:20 +0200
commitc2bd786734c2b94e9cbe332a11caadae122ebd99 (patch)
tree394b0c1d446934bd2045d3b8b58548c084892290 /src
parent0415e0d88239bafd7a41875b725d92f0f314fb60 (diff)
downloadrust-c2bd786734c2b94e9cbe332a11caadae122ebd99.tar.gz
rust-c2bd786734c2b94e9cbe332a11caadae122ebd99.zip
Set desc class on the div instead of the span to simplify CSS
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/html/static/rustdoc.css8
-rw-r--r--src/librustdoc/html/static/search.js4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index cbed08695e7..fb410044781 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -763,7 +763,7 @@ a {
 	clear: both;
 }
 
-.search-results .desc {
+.search-results .desc > span {
 	white-space: nowrap;
 	text-overflow: ellipsis;
 	overflow: hidden;
@@ -784,7 +784,7 @@ a {
 	flex-flow: row wrap;
 }
 
-.search-results .result-name, .search-results > a > div > div:nth-child(2), .search-results .result-description {
+.search-results .result-name, .search-results div.desc, .search-results .result-description {
 	width: 50%;
 }
 .search-results .result-name {
@@ -1754,10 +1754,10 @@ details.undocumented[open] > summary::before {
 		border-bottom: 1px solid #aaa9;
 		padding: 5px 0px;
 	}
-	.search-results .result-name, .search-results > a > div > div:nth-child(2), .search-results .result-description {
+	.search-results .result-name, .search-results div.desc, .search-results .result-description {
 		width: 100%;
 	}
-	.search-results > a > div > div:nth-child(2), .search-results .result-description {
+	.search-results div.desc, .search-results .result-description {
 		padding-left: 2em;
 	}
 }
diff --git a/src/librustdoc/html/static/search.js b/src/librustdoc/html/static/search.js
index 01cfffc5429..9fa6f4678c2 100644
--- a/src/librustdoc/html/static/search.js
+++ b/src/librustdoc/html/static/search.js
@@ -994,8 +994,8 @@ window.initSearch = function(rawSearchIndex) {
                            ("<span class=\"alias\"><b>" + item.alias + " </b></span><span " +
                               "class=\"grey\"><i>&nbsp;- see&nbsp;</i></span>") : "") +
                           item.displayPath + "<span class=\"" + type + "\">" +
-                          name + "</span></div><div>" +
-                          "<span class=\"desc\">" + item.desc +
+                          name + "</span></div><div class=\"desc\">" +
+                          "<span>" + item.desc +
                           "&nbsp;</span></div></div></a>";
             });
             output += "</div>";