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.


Syntax not found in DB!



<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

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic support
Chrome No support NoEdge ? Firefox Full support YesIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android Full support YesOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No


Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.

See also

  • Similar pseudo-elements used by other browsers:

Document Tags and Contributors

Contributors to this page: mdnwebdocs-bot, estelle, MNizam0802, fscholz, teoli, mfluehr, ntoniazzi
Last updated by: mdnwebdocs-bot,