tailwindcss-forms icon indicating copy to clipboard operation
tailwindcss-forms copied to clipboard

Use focus-visible instead of focus

Open DylanVann opened this issue 1 year ago • 1 comments

This will make it so the focus styles only become active when a user is navigating using the keyboard.

DylanVann avatar Mar 08 '24 21:03 DylanVann

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 Mar 8, 2024 9:05pm

vercel[bot] avatar Mar 08 '24 21:03 vercel[bot]

@thecrypticace Have you had a chance to glance at this?

hornta avatar Mar 21 '24 20:03 hornta

Hey! Going to say no to this one for now because a lot of people using Tailwind CSS v3 still need to support Safari 14, and :focus-visible was only added to Safari in 15.4 in March 2022.

We can change this for the v4 version of this in the future though! Will likely be a totally separate project, so going to wait until we actually dig into that before setting up a next branch or anything like that here just to merge something like this.

If it were me I would honestly just grab the output of this plugin and throw it in your CSS file and customize it. That's closer to what we're going to recommend for v4 as well, way easier to just manage this stuff in CSS than as a bunch of JavaScript for no reason:

https://gist.github.com/adamwathan/e0914c8101023124c99cf817d13e52b7

adamwathan avatar Mar 22 '24 18:03 adamwathan