tailwind-system
tailwind-system copied to clipboard
Keeping up to date with Tailwind
I have been experimenting with using Tailwind in a React setup. For now it looks like tailwind.macro
and twin.macro
are the best options, however there are a lot of caveats to this macro approach. One of them is that it does not integrate so well with styled-components as styled-system. The tw
macro is just a standalone static string based util. No type information, no good JS integration, no dynamic interpolation...
So I like the idea of having a solution that is closed to real styled-components and styled-system, and giving all the flexibility of having JS.
However there is one big drawback that seems to appear in all the of the solutions, including tailwind-system
, which is that you need to keep the code base up to date manually when new features are added to Tailwind.
Isn't it possible to create some kind of styled-system 'plugin' that maps the resolved tailwind config or maybe even the generated Tailwind JS utils to styled-system utils? If this is possible, you don't need to keep up to date with Tailwind feature, because it is using Tailwind directly. It prevents the risk of this project getting outdated and eventually abandoned by users.