Replies: 2 comments
-
considering your html looks like:
try: or:
I would recommend simplifying it if your button looks something like:
because then you need something like
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Mentioning because the need for There is also <button class="group">
...
<div class="group-hover:text-red-500">foo</div> <!-- div__text -->
</button> // tailwind.config.js
module.exports = {
variants: {
textColor: ['responsive', 'hover', 'focus', 'group-hover'],
},
} Docs: https://tailwindcss.com/docs/pseudo-class-variants#group-hover |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How do I target .button:hover .div__text{} in Tailwind Css so that the inner text change to red when hovering over the button? If I add hover:text-red to div__text, it does not work as intended as the color only change when hovering over the div__text and not over button div.
Much appreciated, thanks!
Beta Was this translation helpful? Give feedback.
All reactions