-
Hello guys, I have created a simple button with hover effect which changes text color on hover or it should have but the hover effect is not properly applied and even the cursor is not changing for button. When I switch to the previous version v3.4.17 its working just fine. Is it a bug or am I doing something wrong here? Here is the code link in latest tailwind play: |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
Some things:
|
Beta Was this translation helpful? Give feedback.
-
I found solution in the https://tailwindcss.com/docs/upgrade-guide If laptop is touch screen and v4 "thinks" it doesn't have the ability to hover... the solution they propose is to add to the main css file: "@custom-variant hover (&:hover);" it can for try it. |
Beta Was this translation helpful? Give feedback.
-
@Reconfort solved it for me. Got the issue on my mac book m1 max inside my electron react app |
Beta Was this translation helpful? Give feedback.
-
Adding a custom variant fixed it for me. Try reinstalling Tailwind (latest
version v4.1.8) and using Vite if you haven't already.
…On Mon, Jun 2, 2025, 9:30 PM Casey Shore ***@***.***> wrote:
What was the solution?
—
Reply to this email directly, view it on GitHub
<#17225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAGFTY42LTT6QEGPQ2K4HHL3BSJ2ZAVCNFSM6AAAAABZCXVMFSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGMZUGY4TMNQ>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
I found solution in the https://tailwindcss.com/docs/upgrade-guide
"In v4 Tailwind team updated the hover variant to only apply when the primary input device supports hover:"
If laptop is touch screen and v4 "thinks" it doesn't have the ability to hover... the solution they propose is to add to the main css file:
"@custom-variant hover (&:hover);"
it can for try it.