Use @apply with Tailwind?

I see the configuration for Tailwind has gotten much better in PG6. Is there any way to use the @apply features of Tailwind within PG? Or is that not needed as you can do it a different way?

Thanks. And great job on the new version!

Hi @mavard,
It is a little bit of a case-by-case basis, but most components can be created by using the Class Styles panel. Basically, instead of adding classes to an item inline, you add them to a named list and then add that new style to that and any future elements. Here is some documentation about it.
I hope that helps,
Bob

1 Like

I just discovered that @apply does not seem to work in Pinegrow. This is kind of a big problem when @apply is used in Tailwind component libraries.

Is there a way to support @apply styles?

You’ll need to use the external compiler for Tailwind if you want to use @apply styles. Pinegrow’s internal compiler doesn’t support custom configurations. It’s a bummer, but the external compiler is nice once you have it set up.

Here is a video of the process with links to Pinegrow’s documentation in the description.

1 Like

@adamslowe

Thanks for the link! Awesome tutorial. It seems pretty bizarre though for Pinegrow to not support @apply considering how widely it is used with Tailwind. I really hope this is being added at some point.

2 Likes

They have some valid reasons, but it still sucks for us as end users.

1 Like