Skip to content

Commit d01e103

Browse files
authored
Add missing inset keyword for inset-shadow-none (#20208)
This PR fixes an issue where the `inset-shadow-none` class did not use the `inset` keyword. This PR fixes that by introducing the `inset` keyword: ```diff .inset-shadow-none { - --tw-inset-shadow: 0 0 #0000; + --tw-inset-shadow: inset 0 0 #0000; box-shadow: var(--tw-inset-shadow), var } ``` While the end effect is the same (there will be no shadow), it also means that we switch between the types of shadows. This results in the fact that things like transitions don't behave the way they should. A minimal reproduction looks like this: https://play.tailwindcss.com/iOrnKWP49a (depending on when you visit this link, it might be fixed) ## Test plan 1. Updated tests to reflect 2. Verified in the Vite playground that this is the case. In the video you will notice that the transition is smooth in the fixed case, but there is no transition in the current state: https://github.com/user-attachments/assets/15d8c78e-6be5-4c6c-8df9-1044c14e8f39
1 parent 68fcdf1 commit d01e103

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3030
- Ensure `@source` globs with symlinks are preserved ([#20203](https://github.com/tailwindlabs/tailwindcss/pull/20203))
3131
- Ensure later `@source` rules can re-include files excluded by earlier `@source not` rules ([#20203](https://github.com/tailwindlabs/tailwindcss/pull/20203))
3232
- Upgrade: don't migrate empty class rules to invalid `@utility` rules ([#20205](https://github.com/tailwindlabs/tailwindcss/pull/20205))
33+
- Ensure transitions between `inset-shadow-none` and other inset shadows work correctly ([#20208](https://github.com/tailwindlabs/tailwindcss/pull/20208))
3334

3435
### Changed
3536

‎packages/tailwindcss/src/utilities.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27850,7 +27850,7 @@ test('inset-shadow', async () => {
2785027850
}
2785127851

2785227852
.inset-shadow-none {
27853-
--tw-inset-shadow: 0 0 #0000;
27853+
--tw-inset-shadow: inset 0 0 #0000;
2785427854
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2785527855
}
2785627856

‎packages/tailwindcss/src/utilities.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5734,7 +5734,7 @@ export function createUtilities(theme: Theme) {
57345734
if (candidate.modifier) return
57355735
return [
57365736
boxShadowProperties(),
5737-
decl('--tw-inset-shadow', nullShadow),
5737+
decl('--tw-inset-shadow', `inset ${nullShadow}`),
57385738
decl('box-shadow', cssBoxShadowValue),
57395739
]
57405740

0 commit comments

Comments
 (0)