-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
iOS placeholder line-height with some fonts #736
Comments
Closed
@denis-sokolov The following could fix your problem 👍
|
|
For whatever reason, I needed:
|
I had the same problem and I fixed with
Note1: I probably don't need active and focus but I add just in case. Note2: If the font size is smaller than 16px you might have some zoom issues. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On iOS 10, with certain fonts, the vertical alignment of input placeholders is broken because of a strict line-height defined in normalize.css.
normalize.css/normalize.css
Line 159 in 7369f56
In my particular case I have a font Galano Grotesque Alt, and here is how my input looks on iOS:
If I change the line-height to
normal
, iOS fixes the layout:I can’t make an interactive example because the font is not freely available.
This only happens with the placeholder, only on iOS, only with this font in my case. If I start typing in, it aligns correctly:
A general problem with vertical alignment of the placeholder in iOS seems to be prevalent. A web search finds numerous relevant questions on Stack Overflow.
The line-height change was introduced in #607 and is nicely explained in a comment on #591.
I don’t suggest to change that line-height right now. The interaction is obscure, and there seems to be value in the value of line-height as is. I want to preserve this research in case anyone else stumbles in a similar scenario and searches the issue tracker for the issue. So feel free to close this immediately as inactionable, or keep open if you want to ponder more about it.
The text was updated successfully, but these errors were encountered: