There is white text on the page and a button below it. Additionally, animated gradients are applied to fill the text. When the button is clicked, the -webkit-text-fill-color
property will become transparent
, causing the text color to suddenly change to match the gradient.
As shown below: https://codepen.io/hvyjhqnt-the-vuer/pen/poQdaLQ
Is it possible to achieve a smooth transition from white to gradient?
(-webkit-text-fill-color
attribute does not directly support transition
)
The CSS color property is convertible, so use it.