Repository navigation
v1.15.1
enforce-canonical rewrites a class only when its canonical form prints the same CSS, and it
compared the two with the class's own name blanked out only where that name opened the selector.
Several variants put it elsewhere, so their rewrites were never reported. Tailwind's next release
moves every group-* and peer-* class inside its :is()
(tailwindlabs/tailwindcss#20513), which
would have silenced the rule under those variants the day it shipped, before you upgrade this
plugin. This release finds the class wherever its selector puts it.
Before you upgrade
- Reports that can appear with the same config:
enforce-canonicalon classes underin-*,
*:and**:, and ondivide-*with an arbitrary value:in-focus:z-[10]→in-focus:z-10,
*:z-[10]→*:z-10,divide-x-[2px]→divide-x-2, with their autofix. On shadcn/ui's
apps/v4nothing changes.
Bug fixes
enforce-canonicalfinds a class wherever its selector puts it (#228).in-*prints
:where(:focus) .x,*:and**:print:is(.x > *),divide-*prints
:where(.x > :not(:last-child)), and after Tailwind 4.3.3 everygroup-*andpeer-*prints
:is(:where(.group):hover .x). The rule now compares the two forms with the class's own name,
escaped the way Tailwind escapes it, blanked out wherever it appears, and every other class in the
selector as written, so a canonicalization that changes the selector (has-[:checked]:→
has-checked:) is still not made.