heybourn / headwind

An opinionated Tailwind CSS class sorter built for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=heybourn.headwind
MIT License
1.38k stars 46 forks source link

Support for xwind #130

Open IngoVals opened 3 years ago

IngoVals commented 3 years ago

Support for xwind

What is xwind

xwind is a alternative to tw.macro. It can be found here https://github.com/Arthie/xwind.

What does it entail

I haven't looked into this too much, I'm hoping someone has solved this already so I won't waste time. But if no one has this already I will look closer into this. First of is the Regex part. It uses a similar syntax as tw.macro so I assumed it only needed to exchange the tw part to xw but that quick fix doesn't work, so something more is needed.

A syntax difference is how xwind can handle variants. Instead of md:bg-black md:text-white you can do md[bg-black text-white]. This might possibly require a code change.

Any xwind users here that have already solved this and want to share the solution. Any interest?

IngoVals commented 3 years ago

I was wrong about the regex change from tw to xw, it is enough, I just needed to reload the window for the changes to take effect. So next would be to find out about the new variant syntax if we want to support that.