timonweb / django-tailwind

Django + Tailwind CSS = 💚
https://django-tailwind.readthedocs.io
MIT License
1.46k stars 92 forks source link

DaisyUI not working #202

Open kaqfa opened 3 months ago

kaqfa commented 3 months ago

Hello everyone, i want to use DaisyUI on my project.

I've add require('daisyui'), as instructed in their web, my site still only recognize tailwind class not the daisy UI.

Thanks in advance.

oliverhaas commented 2 months ago

If you want help, you need to provide more information.

Additionally, this probably isn't even the right repository to ask for help regarding DaisyUI, since everything related to that belongs to either DaisyUI or actual tailwind.

My tailwind.config.js looks something like below, and django, django-tailwind, tailwind, and DaisyUI work really well together.

themeBase = require("daisyui/src/theming/themes").light

module.exports = {
    content: [
        '../templates/**/*.html',
    ],
    theme: {
        container: {
            center: true,
            padding: {
                "DEFAULT": "1rem",
                "sm": "2rem",
                "lg": "4rem",
                "xl": "6rem",
                "2xl": "8rem",
            },
        },
        extend: {
        },
    },
    plugins: [
        require('@tailwindcss/forms'),
        require('@tailwindcss/typography'),
        require('daisyui'),
    ],
    daisyui: {
        themes: [
            {
                myTheme: {
                    ...themeBase,
                    "primary": "#00709d",
                    "secondary": "#f1f0ee",
                },
            },
        ],
    },
}
levimoore1992 commented 1 month ago

@oliverhaas what other settings did you cahnge? I copied your file directly and also added these

"accent": "#00FFFF",     // Accent color
                "neutral": "#3d4451",    // Neutral color
                "base-100": "#ffffff",   // Base color for backgrounds
                "info": "#2094f3",       // Info color
                "success": "#00c851",    // Success color
                "warning": "#ffbb33",    // Warning color
                "error": "#ff4444",      // Error color

but the issue I have is that classes like

badge badge-success

dont give me my success color(they are treated like they dont exist). The only colors I get are primary and secondary

I installed django-tailwind the way in the documentation