9 Replies
its like a gradient on the text but in a weird way
background-clip:text
I thinkI would prefer someone more experienced to guide the path though as I am not sure if I am correct or there is better way
Yes i think it works fine
add max-width or width:fit-content so the gradient looks better π
nah, you got it. That's the main way to do gradient text atm afaik
yep yep,
background-clip: text;
is the way for this right now. Good on you though for noticing how odd it is. background-clip: text;
is a super hacky thing but it's all we have right now. The official way to do this is going to be a "fill" property but no browser supports it yet: https://www.w3.org/TR/fill-stroke-3/#fill-shorthandDonβt forget to set the text color to transparent to allow the bg gradient to show. And prefixed -webkit-background-clip:text;