Border hover animation reversing

Hi, I'd like to reverse my animation when hovering off the element, and not that it disappears without transition like now. Also the animation is weird and glitchy, can't figure out why.. https://codepen.io/axl-prudhomme/pen/XWOayoN?editors=1100
17 Replies
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
How could I make this animation smoother and reverse the animation when I hover off the element? or is there a different approach ?
ἔρως
ἔρως13mo ago
how about you use a transition instead?
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
I use the transition rule transition: width 0.25s ease-out, height 0.25s ease-out 0.25s;
ἔρως
ἔρως13mo ago
you are you're also using ease-out
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
changed it to ease-in-out but still the same it just disappears
ἔρως
ἔρως13mo ago
i tried linear, and yeah, it didnt work it should, i think
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
yeah, I specify in the transition the width and height, so it should go back to default in a transition should I make it a different way? so it's less chunky and all?
ἔρως
ἔρως13mo ago
you can try with a giant radial background for a ::before, with transparent borders or a different effect
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
wow, how'd I start with the radial background? xD
ἔρως
ἔρως13mo ago
what do you mean?
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
how would I make that
MarkBoots
MarkBoots13mo ago
with a conic-gradient on the before and an @propery to transition a custom property. But,... @property is relative new. Support is not 100% (firefox is about to ship it soon)
ἔρως
ἔρως13mo ago
yup, i didnt had the @property in mind, but i had the gradient in mind you did a fantastic job, and made it configurable
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
Wow, that's quite cool. Thanks! I'll look into that
MarkBoots
MarkBoots13mo ago
we could even do it without the before element (removed codepen, see backup below)
ἔρως
ἔρως13mo ago
that's a lot better
MarkBoots
MarkBoots13mo ago
removed the codepen, here a backup for future reference
Want results from more Discord servers?
Add your server