tailwindlabs / tailwindcss-forms

A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities.
https://tailwindcss-forms.vercel.app
MIT License
4.22k stars 223 forks source link

Fix date time bottom spacing on MacOS Safari #146

Closed reinink closed 1 year ago

reinink commented 1 year ago

In Safari on macOS date time inputs that are set to display: block have unexpected extra bottom spacing.

image

This can be corrected by setting the ::-webkit-datetime-edit pseudo-element to display: inline-flex, instead of the browser default of display: inline-block.

I've tested this fix using date, datetime-local and time inputs on the following versions of MacOS Safari. (MacOS Safari currently does not support month or week.)

I've also had a look at iOS Safari, but date time inputs render completely different there, so this doesn't have any effect at all in that browser.

Note This issue was previously not noticeable in our playgrounds since they were running in quirks mode due to the lack of doctype in those demos. I've corrected that, and now this issue is visible in the playground (again, only on MacOS Safari): https://tailwindcss-forms.vercel.app

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwindcss-forms ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2023 8:03pm