Skip to content

Add focus:outline-none to example code for focus-visible #875

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

Merged
merged 1 commit into from
Jun 20, 2021
Merged

Add focus:outline-none to example code for focus-visible #875

merged 1 commit into from
Jun 20, 2021

Conversation

mornir
Copy link

@mornir mornir commented Jun 20, 2021

See tailwindlabs/tailwindcss#4204 (Adam said that he already updated the docs, but I don't see it here. Maybe it was in another place.)

When I first tried the example code, I didn't understand why the focus ring was still showing when I clicked the button with the mouse. I thought that using focus-visible alone would only show the ring when using the keyboard. It's only when inspecting the source code that I understood that focus:outline-none was necessary (which on a second thought makes perfect sense).

See tailwindlabs/tailwindcss#4204 (Adam said that he already updated the docs, but I don't see it here. Maybe it was in another place.)

When I first tried the example code, I didn't understand why the focus ring was still showing when I clicked the button with the mouse. I thought that using `focus-visible` alone would only show the ring when using the keyboard. It's only when expecting the source code that I understood that `focus:outline-none` was necessary (which on a second thought is actually quite logical).
@vercel
Copy link

vercel bot commented Jun 20, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tailwindlabs/tailwindcss-com/2JtVvAnWzCYMYJ2S7udigcG98fA9
✅ Preview: https://tailwindcss-com-git-fork-mornir-patch-1-tailwindlabs.vercel.app

@adamwathan
Copy link
Member

Thank you this is definitely better! 👊

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.

2 participants