DEV Community

Discussion on: Four subtle Text-Effects to spice up your web-site

Collapse
 
fasani profile image
Michael Fasani

I will give it a shot. Just checked caniuse.com it looks like it’s a no go for IE11 but I will see how performance is there and in other places with that prop and get back to you.

Thread Thread
 
akhilarjun profile image
Akhil Arjun

And by the way i checked out the site. It is dope 😍👾

Thread Thread
 
fasani profile image
Michael Fasani

Hey, thanks, I tried will-change: text-shadow; but it did not seem to make a difference tbh.

I did, however, come up with the following with @keyframes which I think looks great, exactly the kind of thing I was trying to achieve.

.header a:hover {
    animation: glow 0.3s linear forwards;
}

@keyframes glow {
    0% {
        text-shadow: 0 0 0px #ffffff;
    }
    50% {
        color: #ffffff;
        text-shadow: 0 0 10px #8be9fd;
    }
    100% {
        text-shadow: 0 0 0px #8be9fd;
        color: #8be9fd;
    }
}

I mapped the number of animation states (3) to the timing in ms (0.3) as this seemed to have better performance. If you have 4 states, I think 0.4 may be a better time choice and so on, but I can't verify that claim it is just my subjective opinion.

New demo: michaelfasani.com