-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
color classes not being applied #203
Comments
What is your React Native version? I seem to have this This does not anymore work on RN
This seems to work
|
Maybe same issue mentioned here facebook/react-native#47235 |
The problem is that in The line to fix is here:
We should also extract and handle default value. |
I asked Chat GPT to fix fallback and result is
and looks good. App looks again quite valid. This works for example
|
More from Chat GPT answer • If the variable name exists in the object, it replaces it with the corresponding value.
|
I have followed several examples but I cant seem to get the colors to apply, any help appreciated.
I dont get any errors, but the colors/styles do not apply.
This code:
<Text style={tailwind("text-red-600")}>Hello world</Text>
converts to this in
tailwind.css
:.text-red-600 { --tw-text-opacity: 1; color: rgb(220 38 38 / var(--tw-text-opacity, 1)) }
which does not output the text to red, if i manually change tailwind.css to this:
.text-red-600 { --tw-text-opacity: 1; color: #FF0000 }
it works and updates the text to red. all the examples seem to suggest that text colors are supported so im unsure what im doing wrong?
heres my files:
The text was updated successfully, but these errors were encountered: