@@ -50,7 +50,7 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
5050 'font-size' : baseFontSize ,
5151 'line-height' : baseLineHeight ,
5252 '--tw-shadow' : '0 0 #0000' ,
53- '&:focus' : {
53+ '&:focus-visible ' : {
5454 outline : '2px solid transparent' ,
5555 'outline-offset' : '2px' ,
5656 '--tw-ring-inset' : 'var(--tw-empty,/*!*/ /*!*/)' ,
@@ -216,8 +216,8 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
216216 } ,
217217 } ,
218218 {
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 ' ] ,
221221 styles : {
222222 outline : '2px solid transparent' ,
223223 'outline-offset' : '2px' ,
@@ -273,15 +273,15 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
273273 {
274274 base : [
275275 `[type='checkbox']:checked:hover` ,
276- `[type='checkbox']:checked:focus` ,
276+ `[type='checkbox']:checked:focus-visible ` ,
277277 `[type='radio']:checked:hover` ,
278- `[type='radio']:checked:focus` ,
278+ `[type='radio']:checked:focus-visible ` ,
279279 ] ,
280280 class : [
281281 '.form-checkbox:checked:hover' ,
282- '.form-checkbox:checked:focus' ,
282+ '.form-checkbox:checked:focus-visible ' ,
283283 '.form-radio:checked:hover' ,
284- '.form-radio:checked:focus' ,
284+ '.form-radio:checked:focus-visible ' ,
285285 ] ,
286286 styles : {
287287 'border-color' : 'transparent' ,
@@ -307,8 +307,8 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
307307 } ,
308308 } ,
309309 {
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 ' ] ,
312312 styles : {
313313 'border-color' : 'transparent' ,
314314 'background-color' : 'currentColor' ,
@@ -328,7 +328,7 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
328328 } ,
329329 } ,
330330 {
331- base : [ `[type='file']:focus` ] ,
331+ base : [ `[type='file']:focus-visible ` ] ,
332332 class : null ,
333333 styles : {
334334 outline : [ `1px solid ButtonText` , `1px auto -webkit-focus-ring-color` ] ,
0 commit comments