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

Dynamic variants do not render the colors, possibly due to tailwinds JIT #461

Closed
fayazara opened this issue Jul 29, 2023 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@fayazara
Copy link

I am seeing that a lot of components do not apply the styles, when you change the variant/error dynamically.

Example - I have a form and I am using the form group element and it is very common that I will add/update the error prop dynamically, when I do that, I see the -red- classes getting added to the element, but they are empty styles. I believe it's happening because of https://tailwindcss.com/docs/content-configuration#dynamic-class-names

Screenshot 29-07 at 10

Another example with the same issue, I am changing the color of a button on click and this happens.
Screenshot 29-07 at 11

@fayazara fayazara added the bug Something isn't working label Jul 29, 2023
Copy link
Member

This has already been fixed in 208acca.

You can try the Edge version until it is released!

@HossinAmin
Copy link

A temporary solution is to bind the color prop with your error value and add the color red to the safe list.
image
image

Copy link
Member

benjamincanac commented Jul 30, 2023

For now, safelisting the red color through ui.safelistColors is enough to fix this if you're not using the Edge version.

However, you made me realize that the smart safelisting wasn't working when writing components in snake case: <u-input>, this should be solved by e25be11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants