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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DaisyUI not working #202

Open
kaqfa opened this issue Jul 7, 2024 · 2 comments
Open

DaisyUI not working #202

kaqfa opened this issue Jul 7, 2024 · 2 comments

Comments

@kaqfa
Copy link

kaqfa commented Jul 7, 2024

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
Copy link

oliverhaas commented Jul 27, 2024

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
Copy link

levimoore1992 commented Sep 2, 2024

@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

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