1

The behavior looks to be the same.

body {
  text-align: center;
}

p {
  font-size: 2.5em;
  background-image: linear-gradient(to bottom, #ff0052, #8e2b88);
  -webkit-background-clip: text;
}

p.-webkit {
  -webkit-text-fill-color: transparent;
}

p.color {
  color: transparent;
}
<p class="-webkit">-webkit-text-fill-color: transparent</p>
<p class="color">color: transparent</p>

(Or see Codepen)

Browser support of -webkit-background-clip: text is weaker than of -webkit-text-fill-color: transparent, so most probably we don't win better browser support, but does it change anything (like more/less optimal rendering)?

bencergazda
  • 620
  • 8
  • 18

1 Answers1

0

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.

Source: https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-text-fill-color

B. De Greef
  • 111
  • 4