From 2670a4250150ee12d38d71d678ef0700e9aff57c Mon Sep 17 00:00:00 2001 From: Gourav NSS Date: Mon, 9 Feb 2026 17:14:38 +0530 Subject: [PATCH] fix(compat): map maxWidth to max-width namespace in v4 migration --- packages/tailwindcss/src/compat/apply-config-to-theme.test.ts | 2 +- packages/tailwindcss/src/compat/apply-config-to-theme.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/tailwindcss/src/compat/apply-config-to-theme.test.ts b/packages/tailwindcss/src/compat/apply-config-to-theme.test.ts index 12f195e94078..d74dec088dbb 100644 --- a/packages/tailwindcss/src/compat/apply-config-to-theme.test.ts +++ b/packages/tailwindcss/src/compat/apply-config-to-theme.test.ts @@ -141,7 +141,7 @@ test('config values can be merged into the theme', () => { expect(theme.resolve('1/2', ['--width'])).toEqual('60%') expect(theme.resolve('0.5', ['--width'])).toEqual('60%') expect(theme.resolve('100%', ['--width'])).toEqual('100%') - expect(theme.resolve('9xs', ['--container'])).toEqual('6rem') + expect(theme.resolve('9xs', ['--max-width'])).toEqual('6rem') expect(theme.resolve('fast', ['--ease'])).toEqual('cubic-bezier(0, 0.55, 0.45, 1)') expect(theme.get(['--border'])).toEqual(null) diff --git a/packages/tailwindcss/src/compat/apply-config-to-theme.ts b/packages/tailwindcss/src/compat/apply-config-to-theme.ts index 885d2d9ba052..eb700be9e935 100644 --- a/packages/tailwindcss/src/compat/apply-config-to-theme.ts +++ b/packages/tailwindcss/src/compat/apply-config-to-theme.ts @@ -167,7 +167,7 @@ const OLD_TO_NEW_NAMESPACE: Record = { fontSize: 'text', letterSpacing: 'tracking', lineHeight: 'leading', - maxWidth: 'container', + maxWidth: 'max-width', screens: 'breakpoint', transitionTimingFunction: 'ease', }