saadeghi / daisyui

๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ โ€ƒThe most popular, free and open-source Tailwind CSS component library
https://daisyui.com
MIT License
34.14k stars 1.3k forks source link

bug: I found the reason why some daisy ui items are not working #3199

Closed rznkolds closed 2 months ago

rznkolds commented 2 months ago

What version of daisyUI are you using?

v4.12.10

Which browsers are you seeing the problem on?

Chrome

Reproduction URL

none

Describe your issue

When a next js project has the src directory, the third option from the settings suggested at the bottom does not work :

content: [
    "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
    "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
    "./src/(app)/**/*.{js,ts,jsx,tsx,mdx}", <== it's wrong
  ],

This content content prevents daisyui elements from transferring properly.

I organized this problem in this way, I would be glad if you specify this situation as an extra in your documents :)

  content: [
    "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
    "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
    "./src/app/**/*.{js,ts,jsx,tsx,mdx}",  <== it's true
  ]
github-actions[bot] commented 2 months ago

Thank you @rznkolds for reporting issues. It helps daisyUI a lot ๐Ÿ’š
I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
In the meantime providing more details and reproduction links would be helpful.

saadeghi commented 2 months ago

How is this a daisyUI issue?
did I suggest somewhere that you should write ./src/(app)/**โ€ฆ?

rznkolds commented 2 months ago

How is this a daisyUI issue? did I suggest somewhere that you should write ./src/(app)/**โ€ฆ?

sorry I confused you with someone else, when I had the same problem, a friend told me to verify the contents of the tailwind config file, but when I looked into it, I realized that the third element in the list had the wrong directory Anyway, if you want, you can add the solution to this problem to your documentation or to the daisyUI installation information for next js shared as a blog.

saadeghi commented 2 months ago

This is not related to daisyUI. If your content config is wrong, Tailwind class names won't work either.
Read docs: https://tailwindcss.com/docs/content-configuration

You can also see the Next.js setup tutorial on Tailwind CSS site: https://tailwindcss.com/docs/guides/nextjs
Or Tailwind setup tutorial on Next.js site: https://nextjs.org/docs/app/building-your-application/styling/tailwind-css

rznkolds commented 2 months ago

This is not related to daisyUI. If your content config is wrong, Tailwind class names won't work either. Read docs: https://tailwindcss.com/docs/content-configuration

You can also see the Next.js setup tutorial on Tailwind CSS site: https://tailwindcss.com/docs/guides/nextjs Or Tailwind setup tutorial on Next.js site: https://nextjs.org/docs/app/building-your-application/styling/tailwind-css

Okey, Thank you for informations