normalize.css icon indicating copy to clipboard operation
normalize.css copied to clipboard

Why do we need focus ring to make a different between FF and other browsers?

Open ductuan690 opened this issue 6 years ago • 4 comments

These style below make the different for buttons between Firefox and others (Chrome, IE, etc.) when focusing to buttons. Please give me any reasons or clues.

/**

  • Restore the focus styles unset by the previous rule. */

button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { outline: 1px dotted ButtonText; }

ductuan690 avatar Mar 21 '19 07:03 ductuan690

This rule is not related to normalization but restore FF default focus style (1px dotted) unset by this previous rule (FF button spacing).

There is no normalization styles on focus for any browsers, FF or not. A reason why ? See #549 or read this stackoverflow answer.

juytter avatar Apr 01 '19 12:04 juytter

Hi, I observed that Firefox version 107.0 does not make a default dotted outline to focus link/button. Is this styling still applicable in any scenario?

akash123mandal avatar Nov 30 '22 05:11 akash123mandal

In my experimentation, setting the outline to outline: revert restores the default Firefox :focus styles which is a much better experience. revert has good-but-not-great browser support.

mrwweb avatar Mar 28 '23 22:03 mrwweb