:-moz-focusring

by 3 contributors:

« CSS « CSS Reference « Mozilla Extensions

Summary

The :-moz-focusring CSS pseudo-class is similar to the :focus pseudo-class, but it only matches an element if the element is currently focused AND the user-agent has focus ring drawing enabled. If :-moz-focusring matches then :focus also matches, but the converse is not always true - it depends on whether the user-agent has focus ring drawing enabled. Whether the user-agent has focus ring drawing enabled can depend on things like the settings of the operating system the user is using, so the precise behavior of this pseudo-class can vary from platform to platform depending on each platforms' particular focus best practices (defaults) or user modified settings.

Syntax

:-moz-focusring

Example

To specify the appearance of an element when it's focused, you can use this pseudo-selector like this:

mybutton:-moz-focusring {
  outline: 2px dotted;
}

See also

Document Tags and Contributors

Contributors to this page: seth, Jonathan_Watt, Sheppy
Last updated by: seth,