Skip to content

Use focus-visible instead of focus #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

DylanVann
Copy link

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

Copy link

vercel bot commented Mar 8, 2024

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

@hornta
Copy link

hornta commented Mar 21, 2024

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

@adamwathan
Copy link
Member

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 adamwathan closed this Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants