diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index d7f33d6131c84..14b5c851b21a9 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -934,11 +934,6 @@ h2.small-section-header > .anchor { width: 100%; } -#crate-search + .search-input { - border-radius: 0 1px 1px 0; - width: calc(100% - 32px); -} - .search-input:focus { border-radius: 2px; border: 0; @@ -2070,16 +2065,10 @@ details.rustdoc-toggle[open] > summary.hideme::after { } #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; diff --git a/src/librustdoc/html/static/css/themes/ayu.css b/src/librustdoc/html/static/css/themes/ayu.css index 23ee87a4e681d..885fe7c09a973 100644 --- a/src/librustdoc/html/static/css/themes/ayu.css +++ b/src/librustdoc/html/static/css/themes/ayu.css @@ -299,7 +299,8 @@ details.undocumented > summary::before { border-color: #5c6773; } -.since { +.rightside, +.out-of-band { color: grey; } diff --git a/src/librustdoc/html/static/css/themes/dark.css b/src/librustdoc/html/static/css/themes/dark.css index 2db725c9b4e97..71af77978328f 100644 --- a/src/librustdoc/html/static/css/themes/dark.css +++ b/src/librustdoc/html/static/css/themes/dark.css @@ -256,7 +256,8 @@ details.undocumented > summary::before { background: rgba(0,0,0,0); } -.since { +.rightside, +.out-of-band { color: grey; } diff --git a/src/librustdoc/html/static/css/themes/light.css b/src/librustdoc/html/static/css/themes/light.css index 3c8dbeb98c5b3..e462fd16237f2 100644 --- a/src/librustdoc/html/static/css/themes/light.css +++ b/src/librustdoc/html/static/css/themes/light.css @@ -243,6 +243,11 @@ details.undocumented > summary::before { border-color: #bfbfbf; } +.rightside, +.out-of-band { + color: grey; +} + .result-name .primitive > i, .result-name .keyword > i { color: black; } diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index f41c1bd817ab2..f944398272677 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -283,9 +283,6 @@ function hideThemeButtonState() { loadSearch(); } - // `crates{version}.js` should always be loaded before this script, so we can use it - // safely. - searchState.addCrateDropdown(window.ALL_CRATES); var params = searchState.getQueryStringParams(); if (params.search !== undefined) { var search = searchState.outputElement(); @@ -295,30 +292,6 @@ function hideThemeButtonState() { loadSearch(); } }, - addCrateDropdown: function(crates) { - var elem = document.getElementById("crate-search"); - - if (!elem) { - return; - } - var savedCrate = getSettingValue("saved-filter-crate"); - for (var i = 0, len = crates.length; i < len; ++i) { - var option = document.createElement("option"); - option.value = crates[i]; - option.innerText = crates[i]; - elem.appendChild(option); - // Set the crate filter from saved storage, if the current page has the saved crate - // filter. - // - // If not, ignore the crate filter -- we want to support filtering for crates on - // sites like doc.rust-lang.org where the crates may differ from page to page while - // on the - // same domain. - if (crates[i] === savedCrate) { - elem.value = savedCrate; - } - } - }, }; function getPageId() { diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js index e859431e1f189..104464b388114 100644 --- a/src/librustdoc/html/static/js/search.js +++ b/src/librustdoc/html/static/js/search.js @@ -1126,15 +1126,18 @@ window.initSearch = function(rawSearchIndex) { } } - let crates = ``; var output = `