100phlecs / tailwind_formatter

Sorts tailwind classes within elixir projects
https://hexdocs.pm/tailwind_formatter
MIT License
111 stars 11 forks source link

Variant ordering may conflict with intended outcome #8

Open 100phlecs opened 2 years ago

100phlecs commented 2 years ago

https://tailwindcss.com/docs/hover-focus-and-other-states#ordering-stacked-modifiers

even though prose-* variants have a default sort value that pushes them toward back, they actually need to be the last variant on a variant stack to apply correctly.

The quickest solution is to move all the prose-* modifiers above common variants like hover - but maybe there are more not accounted for.

100phlecs commented 2 years ago

Fixed with https://github.com/100phlecs/tailwind_formatter/commit/1595240a2cb49d2f9ea5a573afb10c3f5a2f767d but leaving this issue open in case of other conflicts. If there are enough conflicts, then an alternative sorting approach may be the best path.