-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
upstreamBug in an upstream dependencyBug in an upstream dependency
Description
mix format with canonical_tailwind is not idempotent. A single pass does not produce stable output; running mix format --check-formatted immediately after mix format reports additional changes needed.
Steps to reproduce
- Configure
canonical_tailwindper the README - Have a file containing e.g.
class="h-[48px] w-[48px] flex items-center" - Run
mix format - Run
mix format --check-formatted
Step 4 fails, reporting the file needs further formatting.
What happens
Pass 1 sorts the classes (reordering h-[48px] and w-[48px] to be adjacent). Pass 2 then sees them adjacent and collapses to the shorthand (size-[48px]). A single pass doesn't do both.
Observed shorthand collapses that only appear on a second pass:
h-[48px] w-[48px]->size-[48px]px-[1.2rem] py-[1.2rem]->p-[1.2rem]h-[1.8rem] w-[1.8rem]->size-[1.8rem]
Why this matters
This breaks CI. The standard Phoenix workflow runs mix format --check-formatted in CI to verify formatting. If a single mix format pass doesn't converge, CI will always fail.
Environment
- canonical_tailwind 0.1.0
- tailwindcss CLI 4.2.2
- Elixir 1.19.5 / OTP 28
- Phoenix LiveView 1.1.27
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
upstreamBug in an upstream dependencyBug in an upstream dependency