From 8992454ec24adfaba7d7216388b9ed65f58b0997 Mon Sep 17 00:00:00 2001 From: Dany Castillo <31006608+dcastil@users.noreply.github.com> Date: Fri, 24 Jan 2025 22:13:59 +0100 Subject: [PATCH] add renamed utilities and mark deprecated but still supported classes --- src/lib/default-config.ts | 43 ++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/src/lib/default-config.ts b/src/lib/default-config.ts index 7e081db..4f3f635 100644 --- a/src/lib/default-config.ts +++ b/src/lib/default-config.ts @@ -95,10 +95,23 @@ export const getDefaultConfig = () => { theme: { colors: [isAny], spacing: [isLength, isArbitraryLength], - blur: ['none', '', isTshirtSize, isArbitraryValue], + blur: [ + 'none', + // Deprecated since Tailwind CSS v4.0.0 + '', + isTshirtSize, + isArbitraryValue, + ], brightness: getNumberAndArbitrary(), borderColor: [colors], - borderRadius: ['none', '', 'full', isTshirtSize, isArbitraryValue], + borderRadius: [ + 'none', + // Deprecated since Tailwind CSS v4.0.0 + '', + 'full', + isTshirtSize, + isArbitraryValue, + ], borderSpacing: getSpacingWithArbitrary(), borderWidth: getNumberWithEmptyAndArbitrary(), contrast: getNumberAndArbitrary(), @@ -1201,7 +1214,7 @@ export const getDefaultConfig = () => { * Outline Style * @see https://tailwindcss.com/docs/outline-style */ - 'outline-style': [{ outline: ['', ...getLineStyles()] }], + 'outline-style': [{ outline: ['', 'hidden', ...getLineStyles()] }], /** * Outline Offset * @see https://tailwindcss.com/docs/outline-offset @@ -1222,7 +1235,17 @@ export const getDefaultConfig = () => { * Box Shadow * @see https://tailwindcss.com/docs/box-shadow */ - shadow: [{ shadow: ['none', isTshirtSize, isArbitraryShadow] }], + shadow: [ + { + shadow: [ + // Deprecated since Tailwind CSS v4.0.0 + '', + 'none', + isTshirtSize, + isArbitraryShadow, + ], + }, + ], /** * Box Shadow Color * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color @@ -1320,7 +1343,17 @@ export const getDefaultConfig = () => { * Drop Shadow * @see https://tailwindcss.com/docs/drop-shadow */ - 'drop-shadow': [{ 'drop-shadow': ['', 'none', isTshirtSize, isArbitraryValue] }], + 'drop-shadow': [ + { + 'drop-shadow': [ + // Deprecated since Tailwind CSS v4.0.0 + '', + 'none', + isTshirtSize, + isArbitraryValue, + ], + }, + ], /** * Grayscale * @see https://tailwindcss.com/docs/grayscale