You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
The first example (and second example in screenshot) aligns the label baseline with the bottom of the input element.
The correct behaviour only occurs for the last example (with a parent div).
This also applies for textarea elements.
A workaround is shown in the demo - in short, wrap your input tag in a parent div. Unfortunately CSS selectors will need to be reworked appropriately. Edit: This workaround has limited success but does work for basic inputs. I'm still searching for other workarounds for textarea elements, etc.
The text was updated successfully, but these errors were encountered:
Wrapping in another element didn't help me (I wrapped in a span). What does make a difference is if there is text or a placeholder in the field (you can enter text into it and the tab out to see the alignment jump). I placeholder of a non-breaking space kind of works, but it still doesn't align as well as an actual letter (metrics seem to be different).
Yes, came upon the exact same issue and would love to see it fixed. Thank you for the suggestion with the placeholder hack! Silly, but it works.. ¯_(ツ)_/¯
On iOS Safari,
align-items
uses the bottom of theinput
element for baseline calculations.iOS versions verified: 10.3, 12.1
Example code
The first example (and second example in screenshot) aligns the
label
baseline with the bottom of theinput
element.The correct behaviour only occurs for the last example (with a parent
div
).This also applies for
textarea
elements.A workaround is shown in the demo - in short, wrap your
input
tag in a parentdiv
. Unfortunately CSS selectors will need to be reworked appropriately. Edit: This workaround has limited success but does work for basic inputs. I'm still searching for other workarounds fortextarea
elements, etc.The text was updated successfully, but these errors were encountered: