Repository navigation
chore(deps): upgrade tailwind-merge to v3 - #15
Merged
Merged
Conversation
tailwind-merge 3 is the line that understands Tailwind CSS v4 classes (`w-(--var)`, `outline-hidden`, `field-sizing-*`, `ring-3`, ...). The project has no custom tailwind-merge config and no custom font-size tokens, so `cn` keeps using the default `twMerge`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
tailwind-merge^2.6.1->^3.7.0inapps/dokploy(the only workspace that uses it), plusbun.lock.cninapps/dokploy/lib/utils.tsis a plaintwMerge(clsx(inputs)), and there is noextendTailwindMerge/createTailwindMergeconfig anywhere. So none of the config-level breaking changes apply: theme scale keys, the removedisLength, prefix format,orderSensitiveModifiersand custom separators.Why
tailwind-merge 3 is the line built for Tailwind CSS v4, and we are on
tailwindcss^4.3.3. v2 targets Tailwind v3 and does not recognise v4 syntax such asw-(--var),outline-hidden,field-sizing-*,ring-3orshadow-xs, so it left conflicting classes in place.Release notes (2.6.1 -> 3.7.0)
postfixLookupClassGroupsoption, readonly arrays.color()/light-dark()arbitrary values are classified as colors,max-h-none,pxvsps/pe,columns-auto,bg-conic, container sizes likeinline-2xl.Custom theme tokens
I checked
styles/globals.cssandshadcn/tailwind.cssfor@themetokens that tailwind-merge would need to know about:border,input,ring,background,primary,sidebar-*and so on): the default config handles these, because it treats any unknowntext-*/bg-*/border-*value as a color.--text-*tokens.text-sm text-primarykeeps both classes, andtext-xs ... text-smmerges correctly. No config needed.2xl/8xl/9xl/10xl, radiussm..4xl, breakpoint3xl: these are t-shirt sizes, which the default validators recognise.caret-blink,accordion-down/up: neither v2 nor v3 knows them, but nocncall combines them with anotheranimate-*, so adding them to the config would not change any output.Before/after comparison
A throwaway script (not committed) collected class strings from
components/,pages/,hooks/andlib/:cn(...)callcvavariantclassNameliteralcomponents/uicomponent, combined with theclassNamepassed at each of its call sitesIt ran the same 10,060 class strings through v2.6.1 and v3.7.0. 17 of them give different output. In every one, v3 removes a class that v2 left in place, and that class had already lost in the CSS:
DropdownMenuContentbasew-(--radix-dropdown-menu-trigger-width)+classNamew-56/w-64/w-80/w-[200px]/w-[300px]servers/actions/show-dokploy-actions.tsxw-(--radix-dropdown-menu-trigger-width)w-[200px] max-h-[280px]dashboard/projects/show.tsxw-(--radix-...)andmax-h-(--radix-...)defaultsTabsContentbaseoutline-none+className="outline-hidden"servers/setup-server.tsxoutline-noneoutline-hiddennow shows its intended outlineTextareabasefield-sizing-content+className="field-sizing-fixed"certificates/handle-certificate.tsxfield-sizing-contentfield-sizing-fixedalready won in the CSSw-(--radix-dropdown-menu-trigger-width)layouts/user-nav.tsxui/sidebar.tsx:217,229Verification
bun install --frozen-lockfile: clean.bun run typecheck: all 4 workspaces pass.bunx biome checkon the changed files: clean.bun run test(apps/dokploy): 2053 of 2079 tests pass. The failures are timeouts in server-side tests (better-auth-schema-compat,db-backup-restore-injection,cloud-queue-availability,env-file-literals,remote-stream) and the Docker-backedapplication.real.test.ts. The machine was running several suites in parallel, and the set of failing tests changed between two runs. None of these tests import UI code ortailwind-merge(no test does), so the failures are unrelated to this bump.next buildlocally; CI builds it.Manual check on dev
cncall now goes through the new merge logic.🤖 Generated with Claude Code