diff --git a/CHANGELOG.md b/CHANGELOG.md index c312cea05..1d6d17aac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add CSS codemods for migrating `@tailwind` directives ([#14411](https://github.com/tailwindlabs/tailwindcss/pull/14411)) - Support `screens` in JS config files ([#14415](https://github.com/tailwindlabs/tailwindcss/pull/14415)) - Add `bg-radial-*` and `bg-conic-*` utilities for radial and conic gradients ([#14467](https://github.com/tailwindlabs/tailwindcss/pull/14467)) +- Add new `shadow-initial` and `inset-shadow-initial` utilities for resetting shadow colors ([#14468](https://github.com/tailwindlabs/tailwindcss/pull/14468)) ### Fixed diff --git a/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap b/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap index 8b725ea4b..1b6fc55c5 100644 --- a/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap +++ b/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap @@ -2324,6 +2324,7 @@ exports[`getClassList 1`] = ` "inset-shadow-inherit/90", "inset-shadow-inherit/95", "inset-shadow-inherit/100", + "inset-shadow-initial", "inset-shadow-transparent", "inset-shadow-transparent/0", "inset-shadow-transparent/5", @@ -3302,6 +3303,7 @@ exports[`getClassList 1`] = ` "shadow-inherit/90", "shadow-inherit/95", "shadow-inherit/100", + "shadow-initial", "shadow-transparent", "shadow-transparent/0", "shadow-transparent/5", diff --git a/packages/tailwindcss/src/utilities.ts b/packages/tailwindcss/src/utilities.ts index f6aa60466..bc2c76ba2 100644 --- a/packages/tailwindcss/src/utilities.ts +++ b/packages/tailwindcss/src/utilities.ts @@ -4270,6 +4270,8 @@ export function createUtilities(theme: Theme) { ]) } + staticUtility('shadow-initial', [boxShadowProperties, ['--tw-shadow-color', 'initial']]) + utilities.functional('shadow', (candidate) => { if (candidate.negative) return @@ -4359,6 +4361,11 @@ export function createUtilities(theme: Theme) { }, ]) + staticUtility('inset-shadow-initial', [ + boxShadowProperties, + ['--tw-inset-shadow-color', 'initial'], + ]) + utilities.functional('inset-shadow', (candidate) => { if (candidate.negative) return diff --git a/packages/tailwindcss/tests/ui.spec.ts b/packages/tailwindcss/tests/ui.spec.ts index 674538886..92cbfa3b5 100644 --- a/packages/tailwindcss/tests/ui.spec.ts +++ b/packages/tailwindcss/tests/ui.spec.ts @@ -224,6 +224,9 @@ test('shadow colors', async ({ page }) => {