There was a scripting error on this page. While it is being addressed by site editors, you can view partial content below.

This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

The ::-moz-color-swatch CSS pseudo-element is a Mozilla extension that represents the color selected in an <input> of type="color".

Note: Using ::-moz-color-swatch with anything but an <input type="color"> doesn't match anything and has no effect.


{{ csssyntax }}



<input type="color" value="#de2020"/>


input[type=color]::-moz-color-swatch {
  border-radius: 10px;
  border-style: none;



Not part of any specification. This is a proprietary pseudo-element specific to Gecko.

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Firefox (Gecko) Chrome Internet Explorer Opera Safari
Basic support (Yes) No support No support No support No support
Feature Firefox Mobile (Gecko) Android IE Phone Opera Mobile Safari Mobile
Basic support (Yes) No support No support No support No support

See also

  • Similar pseudo-elements used by other browsers:

Document Tags and Contributors

 Contributors to this page: ntoniazzi, mfluehr
 Last updated by: ntoniazzi,