Fix search section position on small devices - #80412
Conversation
|
Some changes occurred in HTML/CSS/JS. |
There was a problem hiding this comment.
The way this comment is worded confuses me. What does 'under the corresponding section' mean?
There was a problem hiding this comment.
The wording isn't great indeed. What about "the section following it"?
There was a problem hiding this comment.
Maybe something like
| /* This is to prevent the search bar to be under the corresponding section. */ | |
| /* This is to prevent the search bar from being underneath the following section. */ |
then? What's the ID of the following section? It might be good to add that.
There was a problem hiding this comment.
More like "the element following it". Might be better this way haha.
There was a problem hiding this comment.
Might be better this way haha.
Which way is "this way"? ;)
There was a problem hiding this comment.
Updated! Tell me if the new wording is good for you. :)
b391802 to
2ab3651
Compare
|
@GuillaumeGomez can you add a screenshot before and after? |
|
@jyn514 The display doesn't change at all. |
|
I'm confused. If the display is the same, why make the change? In #79936 the display changed to have half the screen dedicated to the item name and the other half to the description; is that different from what's happening here? |
|
I linked to the specific commit in my first comment, but extra info time! The section following the search input (which is included in a form) is in fact over the search input. Which is why I had to make the first fix and I'm adding this one. However, due to layout, the display of this section seems to be under the search input. You can see it easily like this: make a search to see the search results, then reduce the width of the screen (with the debugger tools, since you'll need to use them :p) so that the search input is on its own line. Then check the layout (by simply going over the element in the html tree view in the debugger tool), the one you're want to look for is |
|
📌 Commit 2ab3651 has been approved by |
|
☀️ Test successful - checks-actions |
|
Thank y'all for looking into this! Mobile rustdoc has been much friendlier to use recently ❤️ |
Fixes #79526.
This is exactly the same issue fixed in 9c36491 (in #79936) but applied to the search section. When the width becomes too small, the search input goes on its own line to get more space, making it go "under" the section following (so either "main" or "search"). The fix is to simply make the section go more under so that it doesn't go over the search input.
r? @jyn514