From c2bd786734c2b94e9cbe332a11caadae122ebd99 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 22 May 2021 16:05:20 +0200 Subject: [PATCH] Set desc class on the div instead of the span to simplify CSS --- src/librustdoc/html/static/rustdoc.css | 8 ++++---- src/librustdoc/html/static/search.js | 4 ++-- 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) { ("" + item.alias + "  - see ") : "") + item.displayPath + "" + - name + "
" + - "" + item.desc + + name + "
" + + "" + item.desc + " 
"; }); output += "";