headwind icon indicating copy to clipboard operation
headwind copied to clipboard

Doesn't format on micro sizes

Open Dozorengel opened this issue 4 years ago • 2 comments

Describe the bug If there is a class with micro size spacing, like m-0.5, pt-2.5, headwind doesn't format the tag line at all. I use custom defaultSortOrder config with experimental extended spacing scale released in tailwind 1.7.0, added all the missing classes manually.

This bug affects only the current tag line with micro size, the rest of the code is still formatting correctly. I guessed if I remove micro size classes from the config, they'll be assumed as custom classes and will be moved before or after all classes, but it has no result. Perhaps the parser fails during process on tags with dot inside, unfortunately, there are no errors in the console window to analyze.

Upd: I just realized that it also doesn't format if any custom classes from external files applied. For example, if I apply a class from my custom components.scss, headwind stops format all the classes in the current tag. However, it works fine for classes from the css file located in the same folder with html. Btw, I use Angular.

Dozorengel avatar Aug 24 '20 05:08 Dozorengel

Unless those micro sizes are specified in your package.json file they'll automatically be assumed as cutom classes and sort to the end of the list. Are you saying that adding these still has no effect?

heybourn avatar Oct 06 '20 11:10 heybourn

Unless those micro sizes are specified in your package.json file they'll automatically be assumed as cutom classes and sort to the end of the list. Are you saying that adding these still has no effect?

Indeed, it doesn't work even if I add them into my package.json.

Dozorengel avatar Oct 09 '20 09:10 Dozorengel