::-moz-color-swatch

Non-standard
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

Syntax not found in DB!

Example

HTML

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

CSS

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

Result

Specifications

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

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic support
Non-standard
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

Legend

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: MNizam0802, fscholz, teoli, mfluehr, ntoniazzi
Last updated by: MNizam0802,