diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index f1e0a89883ab8..0743a1d84640d 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -791,7 +791,13 @@ nav.main .separator { margin: 0 20px; } nav.sum { text-align: right; } -nav.sub form { display: inline; } +nav.sub form { + flex-grow: 1; +} + +nav.sub form input { + height: 100%; +} a { text-decoration: none; @@ -883,6 +889,7 @@ table, position: relative; display: flex; height: 34px; + width: 100%; } .search-container > * { height: 100%; @@ -1379,16 +1386,13 @@ pre.rust { } .theme-picker { - position: absolute; - left: -38px; - top: 4px; + position: relative; } - .theme-picker button { outline: none; } -#settings-menu, #help-button { +#settings-menu, #help-button, .theme-picker { margin-left: 4px; outline: none; } @@ -1425,7 +1429,7 @@ pre.rust { display: none; position: absolute; left: 0; - top: 28px; + top: 31px; border: 1px solid; border-radius: 3px; z-index: 1; @@ -1831,12 +1835,6 @@ details.rustdoc-toggle[open] > summary.hideme::after { margin-left: 32px; } - /* Space is at a premium on mobile, so remove the theme-picker icon. */ - #theme-picker { - display: none; - width: 0; - } - .content { margin-left: 0px; } diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 8e1919f75d671..f79a1f56eb549 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -135,15 +135,10 @@ function hideThemeButtonState() { // Set up the theme picker list. (function () { - if (!document.location.href.startsWith("file:///")) { - return; - } var themeChoices = getThemesElement(); var themePicker = getThemePickerElement(); var availableThemes = getVar("themes").split(","); - removeClass(themeChoices.parentElement, "hidden"); - function switchThemeButtonState() { if (themeChoices.style.display === "block") { hideThemeButtonState(); diff --git a/src/librustdoc/html/templates/page.html b/src/librustdoc/html/templates/page.html index baadd3c27b446..34609d44b99fe 100644 --- a/src/librustdoc/html/templates/page.html +++ b/src/librustdoc/html/templates/page.html @@ -108,15 +108,8 @@

{%- endif -%} {#- -#} {#- -#} {#- -#}
{{- content|safe -}}
{#- -#}