`::-moz-color-swatch` CSS pseudo-element
The ::-moz-color-swatch CSS pseudo-element is a Mozilla extension that represents the color selected in an input of type="color".
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-swatchwith anything but an<input type="color">doesn't match anything and has no effect.
Syntax
::-moz-color-swatch {
/* ... */
}
Examples
HTML
<input type="color" value="#de2020" />
CSS
input[type="color"]::-moz-color-swatch {
border-radius: 10px;
border-style: none;
}
Result
300
Specifications
Not part of any standard.
Browser compatibility
See also
- Similar pseudo-elements used by other browsers:
- ::-webkit-color-swatch, pseudo-element supported by WebKit and Blink (Safari, Chrome, and Opera)