diff options
| author | bors <bors@rust-lang.org> | 2022-10-29 09:21:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-29 09:21:35 +0000 |
| commit | 33b530e04099465a8029ef581202d52f4075558e (patch) | |
| tree | fe161be1e2cf8a7882759b1da9e548030efd642f /src/librustdoc | |
| parent | 607878d069267e1402ad792c9331b426e4c6d0f9 (diff) | |
| parent | cc8040e734941bb17ef6e80b0eb55366390eaeba (diff) | |
| download | rust-33b530e04099465a8029ef581202d52f4075558e.tar.gz rust-33b530e04099465a8029ef581202d52f4075558e.zip | |
Auto merge of #103714 - matthiaskrgr:rollup-kajt3i8, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #102961 (Make `CStr::from_ptr` `const`.) - #103342 (Add test for issue 98634) - #103383 (Note scope of TAIT more accurately) - #103656 (Specialize ToString for Symbol) - #103663 (rustdoc: remove redundant CSS/DOM `div.search-container`) - #103664 (rustdoc-json-types: Improve ItemSummary::path docs) - #103704 (Add a test for TAIT used with impl/dyn Trait inside RPIT) Failed merges: - #103618 (Rename some `OwnerId` fields.) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 19 | ||||
| -rw-r--r-- | src/librustdoc/html/static/js/main.js | 2 | ||||
| -rw-r--r-- | src/librustdoc/html/templates/page.html | 34 |
3 files changed, 24 insertions, 31 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 09371dc027b..1cc954a98dc 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -683,13 +683,16 @@ nav.sub { display: flex; align-items: center; } -nav.sub form { +.search-form { + position: relative; + display: flex; + height: 34px; flex-grow: 1; } .source nav.sub { margin: 0 0 15px 0; } -.source nav.sub form { +.source .search-form { margin-left: 32px; } @@ -780,11 +783,6 @@ table, padding-right: 1.25rem; } -.search-container { - position: relative; - display: flex; - height: 34px; -} .search-results-title { margin-top: 0; white-space: nowrap; @@ -860,15 +858,12 @@ so that we can apply CSS-filters to change the arrow color in themes */ -webkit-appearance: textfield for search inputs. That causes rounded corners and no border on iOS Safari. */ -webkit-appearance: none; - /* Override Normalize.css: we have margins and do - not want to overflow */ - box-sizing: border-box !important; outline: none; border: 1px solid var(--border-color); border-radius: 2px; padding: 8px; font-size: 1rem; - width: 100%; + flex-grow: 1; background-color: var(--button-background-color); color: var(--search-color); } @@ -1957,7 +1952,7 @@ in storage.js flex-direction: column; } - nav.sub form { + .search-form { align-self: stretch; } diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 0b816eace64..33480fa41cf 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -932,7 +932,7 @@ function loadCss(cssFileName) { * Hide all the popover menus. */ window.hidePopoverMenus = function() { - onEachLazy(document.querySelectorAll(".search-container .popover"), elem => { + onEachLazy(document.querySelectorAll(".search-form .popover"), elem => { elem.style.display = "none"; }); }; diff --git a/src/librustdoc/html/templates/page.html b/src/librustdoc/html/templates/page.html index ee8938ea603..c3238691687 100644 --- a/src/librustdoc/html/templates/page.html +++ b/src/librustdoc/html/templates/page.html @@ -115,24 +115,22 @@ </a> {#- -#} {%- endif -%} <form class="search-form"> {#- -#} - <div class="search-container"> {#- -#} - <span></span> {#- This empty span is a hacky fix for Safari - See #93184 -#} - <input {# -#} - class="search-input" {# -#} - name="search" {# -#} - autocomplete="off" {# -#} - spellcheck="false" {# -#} - placeholder="Click or press ‘S’ to search, ‘?’ for more options…" {# -#} - type="search"> {#- -#} - <div id="help-button" title="help" tabindex="-1"> {#- -#} - <a href="{{page.root_path|safe}}help.html">?</a> {#- -#} - </div> {#- -#} - <div id="settings-menu" tabindex="-1"> {#- -#} - <a href="{{page.root_path|safe}}settings.html" title="settings"> {#- -#} - <img width="22" height="22" alt="Change settings" {# -#} - src="{{static_root_path|safe}}wheel{{page.resource_suffix}}.svg"> {#- -#} - </a> {#- -#} - </div> {#- -#} + <span></span> {#- This empty span is a hacky fix for Safari - See #93184 -#} + <input {# -#} + class="search-input" {# -#} + name="search" {# -#} + autocomplete="off" {# -#} + spellcheck="false" {# -#} + placeholder="Click or press ‘S’ to search, ‘?’ for more options…" {# -#} + type="search"> {#- -#} + <div id="help-button" title="help" tabindex="-1"> {#- -#} + <a href="{{page.root_path|safe}}help.html">?</a> {#- -#} + </div> {#- -#} + <div id="settings-menu" tabindex="-1"> {#- -#} + <a href="{{page.root_path|safe}}settings.html" title="settings"> {#- -#} + <img width="22" height="22" alt="Change settings" {# -#} + src="{{static_root_path|safe}}wheel{{page.resource_suffix}}.svg"> {#- -#} + </a> {#- -#} </div> {#- -#} </form> {#- -#} </nav> {#- -#} |
