Skip to content
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 search bar input on focus 1px shift #1922

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

cr0t
Copy link
Contributor

@cr0t cr0t commented Jun 15, 2024

Previously, the .search-input set of styles defined border: none, while its :focus state has 1px border set. This led to the “micro-jump” of the placeholder text when the input field gets user focus (and it “jumps” back when it loses one).

With this simple fix, we always have an invisible 1px border set to the input, so it prevents “jumping”.

Screen Recordings

Before After
before_ex_doc_search.mov
after_ex_doc_search.mov

Previously the `.search-input` set of styles defined `border: none`,
while its `:focus` state has 1px border set. This led to the
"micro-jump" of the placeholder text when the input field gets user
focus (and it "jumps" back when it loses one).

With this simple fix we always have invisible 1px border set to the
input, so it prevents "jumping".
@josevalim josevalim merged commit 077da1b into elixir-lang:main Jun 15, 2024
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@cr0t cr0t deleted the fix-search-input-on-focus branch June 15, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants