@@ -50,7 +50,7 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
50
50
'font-size' : baseFontSize ,
51
51
'line-height' : baseLineHeight ,
52
52
'--tw-shadow' : '0 0 #0000' ,
53
- '&:focus' : {
53
+ '&:focus-visible ' : {
54
54
outline : '2px solid transparent' ,
55
55
'outline-offset' : '2px' ,
56
56
'--tw-ring-inset' : 'var(--tw-empty,/*!*/ /*!*/)' ,
@@ -216,8 +216,8 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
216
216
} ,
217
217
} ,
218
218
{
219
- base : [ `[type='checkbox']:focus` , `[type='radio']:focus` ] ,
220
- class : [ '.form-checkbox:focus' , '.form-radio:focus' ] ,
219
+ base : [ `[type='checkbox']:focus-visible ` , `[type='radio']:focus-visible ` ] ,
220
+ class : [ '.form-checkbox:focus-visible ' , '.form-radio:focus-visible ' ] ,
221
221
styles : {
222
222
outline : '2px solid transparent' ,
223
223
'outline-offset' : '2px' ,
@@ -273,15 +273,15 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
273
273
{
274
274
base : [
275
275
`[type='checkbox']:checked:hover` ,
276
- `[type='checkbox']:checked:focus` ,
276
+ `[type='checkbox']:checked:focus-visible ` ,
277
277
`[type='radio']:checked:hover` ,
278
- `[type='radio']:checked:focus` ,
278
+ `[type='radio']:checked:focus-visible ` ,
279
279
] ,
280
280
class : [
281
281
'.form-checkbox:checked:hover' ,
282
- '.form-checkbox:checked:focus' ,
282
+ '.form-checkbox:checked:focus-visible ' ,
283
283
'.form-radio:checked:hover' ,
284
- '.form-radio:checked:focus' ,
284
+ '.form-radio:checked:focus-visible ' ,
285
285
] ,
286
286
styles : {
287
287
'border-color' : 'transparent' ,
@@ -307,8 +307,8 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
307
307
} ,
308
308
} ,
309
309
{
310
- base : [ `[type='checkbox']:indeterminate:hover` , `[type='checkbox']:indeterminate:focus` ] ,
311
- class : [ '.form-checkbox:indeterminate:hover' , '.form-checkbox:indeterminate:focus' ] ,
310
+ base : [ `[type='checkbox']:indeterminate:hover` , `[type='checkbox']:indeterminate:focus-visible ` ] ,
311
+ class : [ '.form-checkbox:indeterminate:hover' , '.form-checkbox:indeterminate:focus-visible ' ] ,
312
312
styles : {
313
313
'border-color' : 'transparent' ,
314
314
'background-color' : 'currentColor' ,
@@ -328,7 +328,7 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
328
328
} ,
329
329
} ,
330
330
{
331
- base : [ `[type='file']:focus` ] ,
331
+ base : [ `[type='file']:focus-visible ` ] ,
332
332
class : null ,
333
333
styles : {
334
334
outline : [ `1px solid ButtonText` , `1px auto -webkit-focus-ring-color` ] ,
0 commit comments