Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

hoverOnlyWhenSupported not works with daisyui #1209

Closed
sr-tamim opened this issue Oct 6, 2022 · 4 comments
Closed

hoverOnlyWhenSupported not works with daisyui #1209

sr-tamim opened this issue Oct 6, 2022 · 4 comments

Comments

@sr-tamim
Copy link

sr-tamim commented Oct 6, 2022

tailwindlabs/tailwindcss#8394

Tailwind has added a new feature. The feature is ~ stop hover effect in mobile & other touch devices. View above link 馃憜

This is a very useful feature. Default hover selector of css causes stuck hover state in mobile.

I have turned on this feature in tailwind.config.js file. It works when I write tailwind classes, but it doesn't work with daisyui components.

Add this feature in daisyui ASAP

@NikarashiHatsu
Copy link
Contributor

This has nothing to do with DaisyUI in general, just update your TailwindCSS dependency, and technically you're good to go.

@sr-tamim
Copy link
Author

sr-tamim commented Oct 6, 2022

@NikarashiHatsu
I've updated tailwind config file. As I said in previous comment that, hoverOnlyWhenSupported feature works when I use tailwind classes like hover:bg-red-500 hover:text-green-400 etc.
But it doesn't work when I use daisyui component classes like button-outline etc.

@NikarashiHatsu
Copy link
Contributor

Hi, thanks for the reply.
Now I understand that how you want it to be as your expectation, but as Mr. Wathan said that:

This is technically a breaking change because there are likely lots of people building things where they actually depend on hover styles taking effect on mobile on tap, like menus that open on hover.

Let me know what you think based on his statement.

I'm afraid that Mr. Saadeghi should made some changes, too, Your requested feature would be delayed until both major updates from DaisyUI and TailwindCSS. Please let me know if you have some workarounds.

@saadeghi
Copy link
Owner

saadeghi commented Oct 6, 2022

Let me mention some facts here.

  • daisyUI component classes are used so people don't have to design things themselves.
  • Tailwind CSS utility classes are used so people can design things themselves.
  • If you use a daisyUI btn it means you don't want to decide how hover should look like etc.
  • daisyUI is a plugin for Tailwind CSS. It's basically a collection of CSS files delivered straight to the Tailwind CSS engine. It's up to Tailwind how it compile the CSS so it's not really up to daisyUI to manipulate the style based on a specific Tailwind config.

I hope it clear things up.
Let me know if you have any questions.

@saadeghi saadeghi closed this as completed Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants