Packages

tailwind-merge

3.7.1 · 19 Nov 2026MIT118.2M / weekRepositorynpmAtom feed

Your version

3.7.1

Latest19 Nov 2026Where it was published

In short

14 fixed3 internal

Release note

Bug Fixes

  • Fix font sizes without a line-height modifier removing earlier leading-* classes

    • In Tailwind CSS v4, an earlier leading-* class still applies after a font size like text-lg or text-[1.5rem], so twMerge('leading-6 text-lg') now keeps both classes. Font sizes with a line-height modifier like text-lg/7 still override leading-*.

  • Fix arbitrary values using --spacing() being classified as colors instead of lengths

  • Fix mask-circle and mask-ellipse not merging

  • Fix flex-(--var) not merging with other flex classes

  • Fix decoration-(--var) being classified as thickness instead of color

  • Fix arbitrary line-clamp values like line-clamp-[calc(var(--characters)/100)] not merging

  • Fix place-* classes not overriding content-*, items-*, self-* and justify-* classes

  • Fix lengths using the Q unit not being recognized

  • Fix brackets and other delimiters inside quoted arbitrary values like data-[label='['] breaking class parsing

  • Fix arbitrary values using contrast-color() or device-cmyk() being classified as lengths instead of colors

  • Fix sr-only not overriding the position, size, spacing, overflow and white-space classes it resets

  • Fix mask-x-* and mask-y-* not overriding the matching edge classes and arbitrary mask stop positions being classified as colors

    • This also fixes arbitrary values using --alpha() or uppercase color functions like RGB() being classified as lengths instead of colors.

  • Fix postfix modifiers not being recognized on classes with a leading important modifier like !text-lg/7

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.