-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
fix(aio): fix search box overlap for small devices #17075
Conversation
@@ -109,6 +109,7 @@ aio-search-box input { | |||
padding: 5px 16px; | |||
margin-left: 8px; | |||
width: 150px; | |||
min-width: 100px; |
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.
I don't see how this changes anything 😕
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.
It just handles smaller screens better so that the Angular icon/log is not sitting directly next to the search bar. It really only applies to iPhone 5 and smaller.
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.
I don't see how it affects anything. You have explicit width
for smaller screens (180px), so setting min-width
to 100px won't have any effect, right?
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.
I think that the mixin below switches width to 50% when the big
breakpoint is triggered?
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 big
breakpoint is min-width: 1000px
. The width is still 150px (which is larger than 100px, so min-width: 100px
should have no effect) and on focus the width becomes 1000px * 50% = 500px
(which again is larger than 100px) 😕
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.
Fair enough. Back to you @sjtrimble
6dac8b4
to
fa3d1ee
Compare
@gkalpak take a look and see if this makes more sense :) |
width: 150px; | ||
height: 40%; | ||
width: 180px; | ||
max-width: 240px; |
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.
What is the purpose of max-width
here, since you already specified width
?
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.
So the animation doesn't pop out of it's 'box'.
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.
I see. You can remove the max-width: 240px
from the @include bp(big)
section below.
@@ -86,7 +86,7 @@ md-toolbar.mat-toolbar { | |||
} | |||
} | |||
|
|||
aio-shell.sidenav-open { | |||
aio-shell.page-home.sidenav-open { |
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.
Why only on home page?
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.
Because the sidenav content drops below the non-transparent toolbar on all other pages.
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.
This has nothing to do with the overlap (and the styles below will not "fix" it). The actual issue on the home page is that the top bar is transparent.
fa3d1ee
to
c54ed35
Compare
c54ed35
to
6e0d17b
Compare
- Adjust search box height - Adjust search box standard width and width for smaller devices - Fix search jump outside of specified max width
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.
This looks behaves right on the preview server. I'll let @gkalpak take one more look before we merge this in, since his first comment hasn't been addressed yet.
Restore the changes introduced in angular#17075, which wre accidentally overwritten while rebasing angular#17155. Also, simplify the topbar positioning rules.
My coments have either been addressed or overwritten by subsequent PRs, so this LGTM 😁 |
Restore the changes introduced in angular#17075, which wre accidentally overwritten while rebasing angular#17155. Also, simplify the topbar positioning rules.
- Adjust search box height - Adjust search box standard width and width for smaller devices - Fix search jump outside of specified max width
Restore the changes introduced in angular#17075, which wre accidentally overwritten while rebasing angular#17155. Also, simplify the topbar positioning rules.
- Adjust search box height - Adjust search box standard width and width for smaller devices - Fix search jump outside of specified max width
Restore the changes introduced in angular#17075, which wre accidentally overwritten while rebasing angular#17155. Also, simplify the topbar positioning rules.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Closes #17054
Closes #17007
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x")
What is the current behavior? (You can also link to an open issue here)
What is the new behavior?
Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: