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

Just-in-Time Mode Support #120

Open furey opened 3 years ago

furey commented 3 years ago

Hi!

Thanks for creating this awesome extension for VSCode!

Are there any plans to support Tailwind's new Just-in-Time "Arbitrary Value" classes (i.e. break-out classes created with square bracket notation)?

For example:

<img class="absolute w-[762px] h-[918px] top-[-325px] right-[62px]" src="/crazy-background-image.png">

Cheers!

🤓👍

sam3d commented 3 years ago

It feels like this would be the perfect time to implement class sorting based on the order that tailwind generates the CSS classes in

BennaceurHichem commented 3 years ago

@praveenperera any updates about the JIT mode support ?

dtcooper commented 2 years ago

Any updates here? Thanks!

praveenperera commented 2 years ago

Hey sorry everyone @heybourn hasn't released a new version in a while.

I think he is busy with a new project. Once he is back I can look into putting more work into this. Or maybe I'll fork this and create a new extension until he can get back and release new versions.

dtcooper commented 2 years ago

An idea: any classname in the format foo-[something] breaks all sorting. What about treating these as "custom classes" and sending them to the front of the classlist?

Just a thought. Thanks for the help here!

DerekLoop commented 2 years ago

I thought changing the RegExp to match brackets would work, but I couldn't seem to get it working.

sam3d commented 2 years ago

I've changed over to eslint-plugin-tailwindcss which has full JIT mode support and it's brilliant!

DerekLoop commented 2 years ago

Thanks for the tip @sam3d, cheers!

dtcooper commented 2 years ago

Thanks for the hot tip! @sam3d