babel-plugin-tailwind-components icon indicating copy to clipboard operation
babel-plugin-tailwind-components copied to clipboard

Support for tailwind 1.2+ [Feature Request]

Open sanishkr opened this issue 4 years ago • 11 comments

Please add support for new utilities introduced with tailwind 1.2 like css grid, transform, etc..

sanishkr avatar Feb 06 '20 18:02 sanishkr

Just digging into the source, I guess we easily could create a PR, as I guess we only have to extend these files:

https://github.com/bradlc/babel-plugin-tailwind-components/blob/master/src/static-styles.js https://github.com/bradlc/babel-plugin-tailwind-components/blob/master/src/dynamic-styles.js

Edit:

These are the files from master, v1 work was done in next. There are many new files, but these style definitions seem to stay the same -> https://github.com/bradlc/babel-plugin-tailwind-components/blob/next/src/

axe312ger avatar Feb 07 '20 14:02 axe312ger

Yeah, right. Please confirm @bradlc

sanishkr avatar Feb 07 '20 14:02 sanishkr

Alright, I'm going in. Starting with staticStyles display section, and will go in that order and keep updating as in latest v1.2 of tw.

It will be great if more people join in and help, maybe take on dynamicStyles

Note: I'm not sure if updating only these 2 files will do the trick. Hope so.

sanishkr avatar Feb 10 '20 08:02 sanishkr

There are features that have been introduced that require some major changes to the selector matching system in this package. I'm releasing a new package soon that has a high degree of support for the new v1.2 features along with a few extras. Follow for announcements

ben-rogerson avatar Feb 10 '20 20:02 ben-rogerson

Thanks @ben-rogerson , shall wait for it then. When can this plugin be released? It will be great if you keep the similar tw`` literal format as in this plugin.

And you mean to say tailwindcss v1.2 features, right?

sanishkr avatar Feb 11 '20 06:02 sanishkr

I'm planning on the first release in two weeks around Feb 26th. I've chosen to use babel-plugin-tailwind-components as a solid base so it'll include the same features, and the macro tw will definitely be kept 👍

Correct, I meant Tailwind 1.2 (I'll edit that).

ben-rogerson avatar Feb 11 '20 06:02 ben-rogerson

Hey all, I've just released my plugin Twin 🎉

ben-rogerson avatar Feb 19 '20 11:02 ben-rogerson

Thank you so much. @ben-rogerson

sanishkr avatar Feb 19 '20 13:02 sanishkr

Isn't it possible to get the features from tailwindcss instead of having to keep this plugin up to date manually?

fvanwijk avatar Apr 30 '20 12:04 fvanwijk

It's only possible to do so up to a certain extent. I guess, @ben-rogerson is doing that in twin.macro.

sanishkr avatar Apr 30 '20 14:04 sanishkr

There is something in progress at https://github.com/ben-rogerson/twin.macro/pull/13

lukasluecke avatar Apr 30 '20 14:04 lukasluecke