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

Allow patterns for defining the sorting order #76

Closed lobo-tuerto closed 4 years ago

lobo-tuerto commented 4 years ago

I think it would be much better to be able to specify an entire class space with something like text-* instead of listing all the existing text-blue-100 text-blue-200 which leaves out any custom color classes you might add.

In this way you would glob all the text-* and proceed to sort then alphabetically, all user added new colors would be taken into account.

Of course, this is a very simplistic solution, but the idea behind it (using patterns to describe the sorting order) is something that could be very useful.

Right now the sort order defined in package.json is only for the TailwindCSS vanilla classes. With a pattern matching approach, you would be able to consider any new additions the user make.

Thoughts?

hacknug commented 4 years ago

Duplicate of #5 ?

heybourn commented 4 years ago

Closing this as it's very similar to #5. Feel free to reopen if you think otherwise!