-
Notifications
You must be signed in to change notification settings - Fork 332
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
feat(autocomplete-theme-classic): align search box properly #511
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit a7f2c9d:
|
looks good! |
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.
looks 🔥
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.
Dope!
@Shipow Good catch, I didn't. Once we merge I'll try to see how it plays out. |
* fix(examples): fix GitHub example layout * fix: apply suggestions from code review Co-authored-by: Clément Vannicatte <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
@Shipow That makes sense indeed. Let's do this in another PR. |
This tweaks the styles so that the search box visually aligns on other elements. This applies to the loading indicator too, and optimizes for the largest possible clickable/tappable area on the submit and clear buttons.
Desktop
Mobile
On mobile, the submit icon has to be close to the left edge to align with the icons below. I didn't replicate this exact gap between the clear button and the right edge, because it looked weird. I've tried to find a gap that felt right instead. It looks a bit odd when looking at it on a computer screen, but feels smooth on a mobile device.
I've tried to simplify the
calc
statements as much as possible so they don't wrap and are easier to read. Whenever a factor or divisor doesn't equal to a fixed decimal value, I used fractions to avoid losing precision.