diff --git a/CHANGELOG.md b/CHANGELOG.md index 710e27792480..196ba911531d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `svh`, `dvh`, `svw`, `dvw`, and `auto` values to all width/height/size utilities ([#14857](https://github.com/tailwindlabs/tailwindcss/pull/14857)) - _Upgrade (experimental)_: Migrate `grid-cols-[subgrid]` and `grid-rows-[subgrid]` to `grid-cols-subgrid` and `grid-rows-subgrid` ([#14840](https://github.com/tailwindlabs/tailwindcss/pull/14840)) - _Upgrade (experimental)_: Support migrating projects with multiple config files ([#14863](https://github.com/tailwindlabs/tailwindcss/pull/14863)) +- _Upgrade (experimental)_: Rename `shadow` to `shadow-sm`, `shadow-sm` to `shadow-xs`, and `shadow-xs` to `shadow-2xs` ([#14875](https://github.com/tailwindlabs/tailwindcss/pull/14875)) +- _Upgrade (experimental)_: Rename `inset-shadow` to `inset-shadow-sm`, `inset-shadow-sm` to `inset-shadow-xs`, and `inset-shadow-xs` to `inset-shadow-2xs` ([#14875](https://github.com/tailwindlabs/tailwindcss/pull/14875)) +- _Upgrade (experimental)_: Rename `drop-shadow` to `drop-shadow-sm` and `drop-shadow-sm` to `drop-shadow-xs` ([#14875](https://github.com/tailwindlabs/tailwindcss/pull/14875)) +- _Upgrade (experimental)_: Rename `rounded` to `rounded-sm` and `rounded-sm` to `rounded-xs` ([#14875](https://github.com/tailwindlabs/tailwindcss/pull/14875)) +- _Upgrade (experimental)_: Rename `blur` to `blur-sm` and `blur-sm` to `blur-xs` ([#14875](https://github.com/tailwindlabs/tailwindcss/pull/14875)) ### Fixed diff --git a/integrations/upgrade/index.test.ts b/integrations/upgrade/index.test.ts index cbc59951370f..1489243a68b1 100644 --- a/integrations/upgrade/index.test.ts +++ b/integrations/upgrade/index.test.ts @@ -71,6 +71,14 @@ test(
+ + + + + + + + `, 'src/input.css': css` @tailwind base; @@ -95,6 +103,14 @@ test( + + + + + + + + --- ./src/input.css --- @import 'tailwindcss'; diff --git a/packages/@tailwindcss-upgrade/src/template/codemods/simple-legacy-classes.test.ts b/packages/@tailwindcss-upgrade/src/template/codemods/simple-legacy-classes.test.ts index 264d7f0ace9f..f35034447975 100644 --- a/packages/@tailwindcss-upgrade/src/template/codemods/simple-legacy-classes.test.ts +++ b/packages/@tailwindcss-upgrade/src/template/codemods/simple-legacy-classes.test.ts @@ -15,6 +15,23 @@ test.each([ ['max-lg:hover:decoration-slice', 'max-lg:hover:box-decoration-slice'], ['max-lg:hover:decoration-slice!', 'max-lg:hover:box-decoration-slice!'], ['max-lg:hover:!decoration-slice', 'max-lg:hover:box-decoration-slice!'], + + ['shadow', 'shadow-sm'], + ['shadow-sm', 'shadow-xs'], + ['shadow-xs', 'shadow-2xs'], + + ['inset-shadow', 'inset-shadow-sm'], + ['inset-shadow-sm', 'inset-shadow-xs'], + ['inset-shadow-xs', 'inset-shadow-2xs'], + + ['drop-shadow', 'drop-shadow-sm'], + ['drop-shadow-sm', 'drop-shadow-xs'], + + ['rounded', 'rounded-sm'], + ['rounded-sm', 'rounded-xs'], + + ['blur', 'blur-sm'], + ['blur-sm', 'blur-xs'], ])('%s => %s', async (candidate, result) => { let designSystem = await __unstable__loadDesignSystem('@import "tailwindcss";', { base: __dirname, diff --git a/packages/@tailwindcss-upgrade/src/template/codemods/simple-legacy-classes.ts b/packages/@tailwindcss-upgrade/src/template/codemods/simple-legacy-classes.ts index 6d20b8cc87e7..19a5f214c0a6 100644 --- a/packages/@tailwindcss-upgrade/src/template/codemods/simple-legacy-classes.ts +++ b/packages/@tailwindcss-upgrade/src/template/codemods/simple-legacy-classes.ts @@ -13,6 +13,23 @@ const LEGACY_CLASS_MAP = { 'flex-shrink-0': 'shrink-0', 'decoration-clone': 'box-decoration-clone', 'decoration-slice': 'box-decoration-slice', + + shadow: 'shadow-sm', + 'shadow-sm': 'shadow-xs', + 'shadow-xs': 'shadow-2xs', + + 'inset-shadow': 'inset-shadow-sm', + 'inset-shadow-sm': 'inset-shadow-xs', + 'inset-shadow-xs': 'inset-shadow-2xs', + + 'drop-shadow': 'drop-shadow-sm', + 'drop-shadow-sm': 'drop-shadow-xs', + + rounded: 'rounded-sm', + 'rounded-sm': 'rounded-xs', + + blur: 'blur-sm', + 'blur-sm': 'blur-xs', } const SEEDED = new WeakSet