According to a recent post on the WebKit blog:
text-fill-color
– This specific property enables the selection of a fill color for text content. In cases where it is left unset, the color
attribute will be utilized for filling purposes.
Indeed, both properties serve a similar function, however, -webkit-text-fill-color
will override the value of color
if they happen to differ.
The reasoning behind this behavior seems to be that users have the flexibility to opt for a distinct color when employing -webkit-text-stroke
, while still having a fallback option in place with color
should -webkit-text-fill-color
not be supported (resulting in unreadable text).
It's noteworthy to mention that, as of 2021, -webkit-text-fill-color
(as well as various other -webkit
prefixed attributes) may work in browsers beyond WebKit-based ones, such as Firefox.