Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert Tailwind classes to css inline style

In these days i'm struggling with the conversion from a react app to a react-native app; in this react app i used tailwind to stylize components thus i need to convert tailwind classes to inline css so that i can convert it to react native stylesheet using a tool online. Is there a way or tool to get css from Tailwind code?

i.e. (Tailwind code) "w-full h-full bg-black" after conversion should be (vanilla css) { width : 100%; height : 100%; background-color : black;}

Thanks in advance!

like image 829
GabryLinux Avatar asked Nov 01 '25 22:11

GabryLinux


1 Answers

The solution to this problem is : Tailwind-rn (as Mando replied)

Thanks to this packet it is possible to copy the entire tailwind code from react project and paste it as param of the function tailwind() which returns a react-native stylesheet object.

Here's the docs :

https://github.com/vadimdemedes/tailwind-rn

like image 72
GabryLinux Avatar answered Nov 03 '25 13:11

GabryLinux



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!