Skip to content

Commit 83d5e01

Browse files
authored
Add focus:outline-none to example code (tailwindlabs#875)
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).
1 parent 8a19d74 commit 83d5e01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages/docs/hover-focus-and-other-states.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Add the `focus-visible:` prefix to only apply a utility when an element has focu
293293
<button class="**focus:ring-2 focus:ring-red-500** ...">
294294
Ring on focus
295295
</button>
296-
<button class="**focus-visible:ring-2 focus-visible:ring-rose-500** ...">
296+
<button class="**focus:outline-none focus-visible:ring-2 focus-visible:ring-rose-500** ...">
297297
Ring on focus-visible
298298
</button>
299299
```

0 commit comments

Comments
 (0)