diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-05-22 16:05:20 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-05-22 16:05:20 +0200 |
| commit | c2bd786734c2b94e9cbe332a11caadae122ebd99 (patch) | |
| tree | 394b0c1d446934bd2045d3b8b58548c084892290 /src | |
| parent | 0415e0d88239bafd7a41875b725d92f0f314fb60 (diff) | |
| download | rust-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.css | 8 | ||||
| -rw-r--r-- | 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) { ("<span class=\"alias\"><b>" + item.alias + " </b></span><span " + "class=\"grey\"><i> - see </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 + " </span></div></div></a>"; }); output += "</div>"; |
