Tailwind CSS - Parent style when child is hovered
So, I need to have a parent styled (background to blue) only when a child element is hovered.
I've done this with Javascript, toggling class .hovered on parent upon hovering the child.
Is there a better way to do this on tailwind css? Or another question is, with my solution, how do I implement tailwind? Right now Im using @apply to style children with .hovered on parent.
But I'm aware that using @apply is not the best practice.
Anyone help? Any tips?
I've done this with Javascript, toggling class .hovered on parent upon hovering the child.
Is there a better way to do this on tailwind css? Or another question is, with my solution, how do I implement tailwind? Right now Im using @apply to style children with .hovered on parent.
But I'm aware that using @apply is not the best practice.
Anyone help? Any tips?
