Skip to content

0.6.0

Latest

Choose a tag to compare

@github-actions github-actions released this 17 Apr 12:50
· 2 commits to main since this release

What's Changed

  • ✨ tailwindClassOrder option — configurable class ordering through buckets (#5).
    Priority-based matching: explicit {pattern} buckets always win over "unknown" / "tailwind" catchalls, regardless of position in the config. Bucket order in the config controls output order only. Value is a string — path to a .js/.json file or a JSON-encoded array. See docs/options.md.
    Typical use cases:
    • Push js-* hooks (or any behaviour-only markers) to the end of the class list.
    • Keep BEM modifiers next to the base class (icon icon--check-circle) so they stay grouped even when the base class is a known Tailwind utility and the modifier isn't.
    • Pull component-like utilities (h[1-6], multi-property utilities) up front.
    • Separate project-specific class families from generic Tailwind utilities.
  • 🐛 Fix n:class ternary branches containing PHP concatenation (#5).
    A branch like $x ? 'foo bar' . $y->method() used to be split on whitespace and fed to the class sorter — the . $y->method() fragment ended up in the middle of the class list, breaking the template. Conditional branches that aren't plain single-quoted strings are now treated atomically.
  • 🐛 Fix normalize-barriers collapsing newlines between sortable n:class tokens (#5).
    Multi-line n:class layouts (one token per line) had their newlines collapsed into a single-space , separator after sorting. Newlines in the original input are now preserved; only horizontal-only separators still collapse to , .

Full Changelog: 0.5.0...0.6.0