I'm trying to customize a link class to have the after:content-['→'] to translate-x-2 whenever you hover over the link and I can't get it to work, and only want the arrow to animate, not the text. Here's the code I have:
.more-link {
@apply text-green-700 font-semibold no-underline after:content-['→'] after:ml-2 transition ease-in-out hover:after:content-['→'] hover:after:translate-x-2 hover:text-green-800;
}
I've tried changing the nesting order, but that did nothing. Is this even possible to animate the after pseudo element or nah?
Figured it out! Key was adding the inline-flex.