Skip to content

Using group-hover with a css child selector #13309

Closed Answered by andymccray
janhoeck asked this question in Help
Discussion options

You must be logged in to vote

Hi @janhoeck,

This should do the trick: https://play.tailwindcss.com/g4y7m49VFw :)

<button class="group [&:hover_span]:text-red-200">
  <span>Child</span>
</button>

Cheers,
Andy

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@janhoeck
Comment options

@andymccray
Comment options

Answer selected by janhoeck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants