tailwindlabs / tailwindcss

A utility-first CSS framework for rapid UI development.
https://tailwindcss.com/
MIT License
83.28k stars 4.22k forks source link

Align empty date/time inputs in Safari iOS #14977

Open MartijnCuppens opened 1 week ago

MartijnCuppens commented 1 week ago

Safari adds display: inline-flex to date/time inputs, and this causes some alignment issues to empty dates:

image

Issue demo: https://play.tailwindcss.com/5LRvozLfrJ

By setting the display to display: inline-block (like the other browsers), and changing the vertical alignment of a pseudo element, the alignment is fixed again:

image

Fix demo: https://play.tailwindcss.com/5juwgUQI6s