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

Tailwind v3 neutral color palette no longer working after installing daisyui #1070

Closed
sbahman opened this issue Aug 29, 2022 · 5 comments
Closed

Comments

@sbahman
Copy link

sbahman commented Aug 29, 2022

Tailwind added the neutral color palette for v3 https://tailwindcss.com/docs/customizing-colors. After installing daisyui there is a conflict as daisyUI also defines a neutral color.

This can be fixed with the following addition to the tailwind.config as described in this StackOverflow post

const colors = require('tailwindcss/colors');

/** @type {import('tailwindcss').Config} */
module.exports = {
    content: [],
    theme: {
        extend: {
            colors: {
                neutral: colors.neutral,
            }
        }
    },
    plugins: [
        require("daisyui")
    ],
}

If possible I think this should not be necessary or else this should be mentioned in the docs.

@shrekuu
Copy link

shrekuu commented Sep 2, 2022

I also find my neutral color does not work now.
eg: bg-neutral-300

I got neutral, neutral-focus, neutral-content these 3 colors.

image

@saadeghi
Copy link
Owner

saadeghi commented Sep 2, 2022

This is the reason why it's not working: #683 (comment)

I will try to find a way to fix this without creating duplicate styles...

@ben-xD
Copy link

ben-xD commented Jan 8, 2023

Extra note: This also happens with primary, probably for the same reason. I agree that "semantic color names" (primary) is nicer than using actual colors - that's why I'm using it even with tailwind (before I heard of DaisyUI). It's not nice that my colors are broken. 🤓😅

Side note: I think it would be fine if DaisyUI overrides them, but currently it doesn't look like there is a way to configure the color palette (50, 100, 200, ..., 800, 900).

DaisyUI was really nice to use today in some experimentation. Thanks :)

@ylor
Copy link

ylor commented Jan 8, 2023

Was also bitten by this.

I would also suggest that daisyUI, as a Tailwind library, should only extend/enhance Tailwind's defaults.

(@saadeghi Many thanks for your work here, I am not a designer but daisyUI helped me get something nice to look at in the browser in record time)

@saadeghi
Copy link
Owner

Fixed in latest version 2.49.0

inorganik pushed a commit to inorganik/daisyui that referenced this issue Feb 7, 2023
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

5 participants