Open tirthGajjar opened 3 years ago
Hey @tirthGajjar, thanks for this, looks great. Could you add a test for it?
Also how did you decide on that order?
@praveenperera Thanks, I will add the test cases.
About the proposed order or variants, Tailwind team suggests specific order when stacking varaints for a single classname, to make everything work. https://tailwindcss.com/docs/configuration#variant-order https://tailwindcss.com/docs/dark-mode#stacking-with-other-variants
I just used this order to sort multiple classes, plus it looked a little more organized.
Sounds good, there is also an empty
variant in the master branch file should we add that too? https://github.com/tailwindlabs/tailwindcss/blob/master/stubs/defaultConfig.stub.js#L807-L823
Also does this sort stacked variants or just based on the first variant? I think it would be okay to just sort on the first variant.
Yes, It sorts based on the stacked variants. Sure I will make the final changes and update in 2 days.
Any updates about this?
closes #131