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
Text cursor not centered vertically in Safari browser #351
Comments
That's pretty weird, the text is vertically centered. Not sure if that counts as a bug... |
After some research on the web it appears like recurrent issue for Safari, mobile Safari and even Chrome.
may also be fixed by |
I've noticed this issue with how Safari draws cursors--it's deeply inconsistent with other browsers. |
We've been using I'm afraid a change to |
@llorca - What if we just use top/bottom padding within the input? Then we can keep line-height normal in all browsers and still have the power to massage the vertical offsets of the text. |
We could try, we didn't use padding to begin with because of the inconsistencies between browsers (we ended up with an input of 31px in some cases) |
just studied github's repo search box and here's what i learned: .centered-input-text {
font-size: 13px;
line-height: 20px;
} |
the root cause is that our 14px font-size produces 11px-tall letters, whereas 16px font-size (large) produces 12px-tall letters. the odd height means it can't ever be centered on the whole pixel which causes the off-by-a-few issue in the screenshot above. so a font-size that produces 10px-high letters of course solves the centering problem. (see #371 for original discussion) |
Bug report
Steps to reproduce
Actual behavior
Text cursor is not centered vertically:
The text was updated successfully, but these errors were encountered: