I can't seem to find anything or anyone that has done this. I'm trying to limit how many images we are using, and would like to create a text with a gradient as its "color" and have a gradient outline/stroke around it
So far, I haven't see anything that has incorporated the two together.
I've can get the text gradient done, by itself, and the text outline gradient by itself. Is there a way to combine to two as one?
h1 {
text-transform: uppercase;
font-size: 50px;
font-weight: 800;
color: rgb(255, 255, 255);
background-image: linear-gradient(
rgb(255, 255, 255) 46%,
rgb(125, 142, 167) 49%,
rgb(211, 226, 249) 80%
);
text-align: center;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-text-stroke: 1px rgb(0, 0, 0);
}
h1::first-letter {
font-size: 125%;
}
h2 {
font-size: 50px;
font-weight: 800;
text-transform: uppercase;
text-align: center;
background: -webkit-linear-gradient(
-86deg,
#eef85b 5%,
#7aec8d 53%,
#09e5c3 91%
);
-webkit-background-clip: text;
-webkit-text-stroke: 4px transparent;
color: #232d2d;
}
h2::first-letter {
font-size: 125%;
}
::aftersince you do use::first-letter, and it's not really dynamic, so I won't post it as an answer.