-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Fix search section position on small devices #80412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Some changes occurred in HTML/CSS/JS. |
@@ -1570,7 +1570,8 @@ h4 > .notable-traits { | |||
height: 73px; | |||
} | |||
|
|||
#main { | |||
/* This is to prevent the search bar to be under the corresponding section. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way this comment is worded confuses me. What does 'under the corresponding section' mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wording isn't great indeed. What about "the section following it"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More like "the element following it". Might be better this way haha.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better this way haha.
Which way is "this way"? ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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