-webkit-text-fill-color

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.

Summary

The -webkit-text-fill-color CSS property specifies the fill color of characters of text. If this property is not set, the value of the color property is used.

Initial valuecurrentcolor
Applies toall elements
Inheritedyes
Mediavisual
Computed valueas specified
Animatableyes, as a color
Canonical orderthe unique non-ambiguous order defined by the formal grammar

Syntax

/* <color> values */
-webkit-text-fill-color: red;
-webkit-text-fill-color: #000000;
-webkit-text-fill-color: rgb(100, 200, 0);

/* Global values */
-webkit-text-fill-color: inherit;
-webkit-text-fill-color: initial;
-webkit-text-fill-color: unset;

Values

<color>
The foreground fill color of the element's text content.

Formal syntax

<color>

where
<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>

where
<rgb()> = rgb( <rgb-component>#{3} )
<rgba()> = rgba( <rgb-component>#{3} , <alpha-value> )
<hsl()> = hsl( <hue>, <percentage>, <percentage> )
<hsla()> = hsla( <hue>, <percentage>, <percentage>, <alpha-value> )
<named-color> = <ident>
<deprecated-system-color> = ActiveBorder | ActiveCaption | AppWorkspace | Background | ButtonFace | ButtonHighlight | ButtonShadow | ButtonText | CaptionText | GrayText | Highlight | HighlightText | InactiveBorder | InactiveCaption | InactiveCaptionText | InfoBackground | InfoText | Menu | MenuText | Scrollbar | ThreeDDarkShadow | ThreeDFace | ThreeDHighlight | ThreeDLightShadow | ThreeDShadow | Window | WindowFrame | WindowText

where
<rgb-component> = <integer> | <percentage>
<alpha-value> = <number>
<hue> = <number>

Example

CSS Content

p {
  margin: 0;
  font-size: 3em;
  -webkit-text-fill-color: green;
}

HTML Content

<p>This text is green.</p>

Specifications

Specification Status Comment
Web Compatibility Standard
The definition of '-webkit-text-fill-color' in that specification.
Living Standard Initial standardization
Safari CSS Reference
'-webkit-text-fill-color' in that document.
Non-standard unofficial documentation Initial definition

Browser compatibility

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

See Also

Document Tags and Contributors

 Contributors to this page: Sebastianz, cvrebert, Siilwyn, mrenty
 Last updated by: Sebastianz,