-
Notifications
You must be signed in to change notification settings - Fork 85
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
arbitrary named colors and font family #306
Comments
hi, thanks for the issue! it's not so much that these aren't working as expected as that they haven't been implemented yet. as noted in the readme, arbitrary support was implemented for the most common use cases, and it's been slowly extending as people open issues requesting support for more, like this one. i'm sympathetic to wanting both of these use cases. if you wanted to PR it, you're welcome, otherwise i'll try to do it before too long. couple notes: in the named color case, i think we'd want to validate it against the list here: https://reactnative.dev/docs/colors#named-colors and, for arbitrary font families: i think that RN native (not web) has no concept of stacks of families, so we would pull just |
Hi 👋,Your right, RN does not have font family stacks (I was testing your library in a web context at the time of writing the issue). I imagine rendering differently based on the Given the focus is not towards RNW, have you given any thought about preemptive react-strict-dom support. Listening to React team devs it seems this is the eventual future of RN. |
I haven't yet, nor have I really even looked into any React 19 stuff. TBH I don't do a ton with RN anymore (I built this library a few years ago when I was working on an RN app, and it's in maintenance mode now) - most of my day to day work is not in React or web tech these days. Thats not to say this library is unmaintained, I try to stay on top of things for the most part, but I'm just honestly not deeply invested in the React or RN world. |
Thank you for your honesty. I recently started using your library due to the instability I experienced with NativeWind, and I must say, twrnc has been fantastic so far! I understand there are some architectural differences between twrnc and NativeWind. Currently I see twrnc is the best option for using Tailwind on React Native. Finding a maintainer might be a future possibility. I would be interested if you have any resources you found helpful in learning to write compilation tools. |
parsers, interpreters and compilers are sort of my programming hobby. if you're interested in learning about them my recommendation is to start by coding along with one of two books: Thorston Ball's "Writing a compiler in Go", or Bob Nystrom's "Crafting Interpreters". i've written Thorston's "monkey" language in 4 or 5 different languages, it's how i teach myself a new language.
yeah, at some point perhaps. i'm not at that point yet, i'm still committed to this project and am actively maintaining it, i just can't say I'm immersed in the world of React and fully staying up with all of the future directions. |
arbitrary colors ( |
When attempting to use arbitrary values in the font family utility class (i.e.,
font-[Baskerville]
) and/or using a RN supported named color in the background color utility class (i.e.,bg-[lemonchiffon]
) I get the following error warning(s):`[
arbitrary value here]`
unknown or invalid utility
Current setup:
M1 mac 14.5
node 20.12.2
expo 51.0.11 (default template)
twrnc 4.2.0
ios 17.5 && web
I assume there may be other utility classes whose arbitrary values not currently functioning as expected.
The text was updated successfully, but these errors were encountered: