After testing on OSX Chrome 45, it appears that align-items: center;
works for content alignment, but there is an issue with caret positioning in an empty editable field until text is typed.
Is there a solution to this problem that doesn't involve adjusting padding or causing pixel shifting? Any suggestions would be greatly appreciated. Thank you.
[contenteditable="true"] {
border: 1px solid #ddd;
display: flex;
align-items: center;
min-height: 46px;
}
[contenteditable="true"]:focus {
outline: none;
}
<div contenteditable="true"></div>
<div contenteditable="true>content is centered, but the caret isn't</div>