Skip to content

Does this support Tailwind 4? #16

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

Open
IngwiePhoenix opened this issue Apr 7, 2025 · 3 comments
Open

Does this support Tailwind 4? #16

IngwiePhoenix opened this issue Apr 7, 2025 · 3 comments

Comments

@IngwiePhoenix
Copy link

Title really says it all. I am so on the edge to ditch React; but I have grown super used to Tailwind, so I would like to keep using that...and this seems like a very essential tool to have :)

Thanks!

@Oudwins
Copy link
Owner

Oudwins commented Apr 7, 2025

Not yet. I do plan on adding support but at the moment I am quite busy working on Zog (and well my actual work) so I can't really give you a timeline. If you or anyone wants to take a crack at it here is what needs to be done:

  • update the current code to create the config when we build or by using go generate. Tw merge js does it on first merge call. Right now the entire config is hardcoded in a very un maintainable way.
  • read through the tw merge js code, copy the tests, and adapt the code.

Honestly it's probably quite a bit of work and like I said I'll get to it eventually

@IngwiePhoenix
Copy link
Author

So you probably mean this little monster? https://github.com/Oudwins/tailwind-merge-go/blob/master/pkg/twmerge/default-config.go

Not gonna promise anything, but I might try to look into this =)
I recently experimented with QuickTemplate: https://github.com/valyala/quicktemplate
It's CLI and using JSON imput might make for a useable generator. That said, I have yet to look at the JS version. Still, this seems very interesting, so I'll at least give it a try!

@Oudwins
Copy link
Owner

Oudwins commented Apr 7, 2025

Yes that monster! This is what the tailwindmerge js config looks like: https://github.com/dcastil/tailwind-merge/blob/main/src/lib/default-config.ts

Then they pass that config through a function that builds the other one. To avoid having a 20k+ lines file. And have something that is more maintainable and can better adapt to changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants