Closed praveenperera closed 4 years ago
Woah! Interesting approach. How necessary is it to have our own file full of classes? Is it not possible to tap into these directly through a Tailwind install?
It might be possible to use Tailwind to get just a list of class names, I'm not sure I haven't looked into that.
However, the problem with that is, it be it would be pretty slow. Tailwind would have to to spit out the list of class names every time headwind was to run. I guess we could save the list of class names to a file the first time, but then we are back to what I have right now.
Also since the list of class names would only change when the tailwind.config.js
file changes this would be a lot of wasted effort.
What I want to do in the future is:
@praveenperera what's the status of this PR? Any updates?
@Buffalom I think this approach only makes sense if the order of the classes tailwindcss generates is the same order we want headwind to sort by. I don't think right now it makes sense to order by the order of appearance in tailwind.css. I will close this.
Created a default sorter file with all > 16,000 classes created generated by the default Tailwind CSS config.
With this PR classes will be sorted by how they appear in tailwind. One advantage of this is that that all responsive classes
sm:.., xl:...
should also now be sorted properlyTo Do
Future
After this PR, we can look into watching the users
tailwind.config.js
and rebuilding the sorter array from it when it changes.@heybourn, @joshmanders what do you think?
This would address #52