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

fix: tailwindcss neutral color compatibility #3241

Closed
wants to merge 3 commits into from

Conversation

Innei
Copy link

@Innei Innei commented Oct 19, 2024

like neutral-50 will be compatible with postcss @apply text-neutral-50/0.5

Signed-off-by: Innei <[email protected]>
@saadeghi
Copy link
Owner

It already works: https://play.tailwindcss.com/sJeDF0hk7x?file=css

What's the issue?

@Innei
Copy link
Author

Innei commented Oct 19, 2024

@saadeghi The text-neutral-50/0.5 class does not exist. If text-neutral-50/0.5 is a custom class, make sure it is defined within a @layer directive.

CleanShot 2024-10-20 at 12  49 30@2x

@saadeghi
Copy link
Owner

opacity is 0 to 100 (not 0.5)
https://tailwindcss.com/docs/text-color#changing-the-opacity

@saadeghi saadeghi closed this Oct 19, 2024
@Innei
Copy link
Author

Innei commented Oct 21, 2024

@saadeghi theme(colors.neutral.400/0.3) postcss theme() is 0-1 not 0-100

@Innei
Copy link
Author

Innei commented Oct 26, 2024

@saadeghi This is not compatible, please reopen this pr

@saadeghi
Copy link
Owner

I can't merge this PR.
It's importing Tailwind CSS but Tailwind CSS is not a dependency of daisyUI.
Apart from that, I'm not sure what issue it's going to solve. theme() is a directive from Tailwind CSS and it accepts opacity values from 0 to 100. 0.5 is not valid.

If you're having an issue in a specific setup, please share a minimal reproduction link.

@saadeghi saadeghi reopened this Oct 26, 2024
@Innei
Copy link
Author

Innei commented Oct 26, 2024

But theme(colors.neutral.50/10);

also got error

@saadeghi
Copy link
Owner

@Innei Can you tell me how you're using it? A minimal reproduction link?

@Innei
Copy link
Author

Innei commented Oct 27, 2024

Thx reply. Demo is:

https://play.tailwindcss.com/ZykCesQyCH?file=css

#3250

src/theming/index.js Outdated Show resolved Hide resolved
src/theming/index.js Outdated Show resolved Hide resolved
Signed-off-by: Innei <[email protected]>
Signed-off-by: Innei <[email protected]>
@Innei
Copy link
Author

Innei commented Oct 27, 2024

I've changed it, please review again

@saadeghi
Copy link
Owner

saadeghi commented Nov 3, 2024

The build is failing and colors.neutral is broken now.

@saadeghi saadeghi closed this Nov 3, 2024
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

Successfully merging this pull request may close these issues.

2 participants