Skip to content

Commit 63b321b

Browse files
authored
Remove --drop-shadow-none from default theme (#14847)
This PR removes `--drop-shadow-none` from the default theme which shouldn't ever have been there since we handle all `*-none` utilities as static/permanent utilities in the framework now. I've added `drop-shadow-none` as an explicit static utility, and also slightly improved test coverage for `getClassList` around drop shadows while touching this part of the code. --------- Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
1 parent 7cc2d89 commit 63b321b

File tree

7 files changed

+12
-3
lines changed

7 files changed

+12
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
- _Upgrade (experimental)_: Install `@tailwindcss/postcss` next to `tailwindcss` ([#14830](https://github.com/tailwindlabs/tailwindcss/pull/14830))
1616
- _Upgrade (experimental)_: Remove whitespace around `,` separator when print arbitrary values ([#14838](https://github.com/tailwindlabs/tailwindcss/pull/14838))
1717

18+
### Changed
19+
20+
- Remove `--drop-shadow-none` from the default theme in favor of a static `drop-shadow-none` utility ([#14847](https://github.com/tailwindlabs/tailwindcss/pull/14847))
21+
1822
## [4.0.0-alpha.31] - 2024-10-29
1923

2024
### Added

packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = `
296296
--drop-shadow-lg: 0 10px 8px #0000000a, 0 4px 3px #0000001a;
297297
--drop-shadow-xl: 0 20px 13px #00000008, 0 8px 5px #00000014;
298298
--drop-shadow-2xl: 0 25px 25px #00000026;
299-
--drop-shadow-none: 0 0 #0000;
300299
--spacing-px: 1px;
301300
--spacing-0: 0px;
302301
--spacing-0_5: .125rem;

packages/tailwindcss/src/__snapshots__/index.test.ts.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ exports[`compiling CSS > \`@tailwind utilities\` is replaced by utilities using
295295
--drop-shadow-lg: 0 10px 8px #0000000a, 0 4px 3px #0000001a;
296296
--drop-shadow-xl: 0 20px 13px #00000008, 0 8px 5px #00000014;
297297
--drop-shadow-2xl: 0 25px 25px #00000026;
298-
--drop-shadow-none: 0 0 #0000;
299298
--spacing-px: 1px;
300299
--spacing-0: 0px;
301300
--spacing-0_5: .125rem;

packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,6 +1900,8 @@ exports[`getClassList 1`] = `
19001900
"divide-y-4",
19011901
"divide-y-8",
19021902
"divide-y-reverse",
1903+
"drop-shadow-none",
1904+
"drop-shadow-sm",
19031905
"duration-100",
19041906
"duration-1000",
19051907
"duration-150",

packages/tailwindcss/src/intellisense.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function loadDesignSystem() {
2121
theme.add('--perspective-dramatic', '100px')
2222
theme.add('--perspective-normal', '500px')
2323
theme.add('--opacity-background', '0.3')
24+
theme.add('--drop-shadow-sm', '0 1px 1px rgb(0 0 0 / 0.05)')
2425
return buildDesignSystem(theme)
2526
}
2627

packages/tailwindcss/src/utilities.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3655,6 +3655,11 @@ export function createUtilities(theme: Theme) {
36553655
},
36563656
])
36573657

3658+
staticUtility('drop-shadow-none', [
3659+
filterProperties,
3660+
['--tw-drop-shadow', ' '],
3661+
['filter', cssFilterValue],
3662+
])
36583663
functionalUtility('drop-shadow', {
36593664
themeKeys: ['--drop-shadow'],
36603665
handle: (value) => [

packages/tailwindcss/theme.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@
331331
--drop-shadow-lg: 0 10px 8px rgb(0 0 0 / 0.04), 0 4px 3px rgb(0 0 0 / 0.1);
332332
--drop-shadow-xl: 0 20px 13px rgb(0 0 0 / 0.03), 0 8px 5px rgb(0 0 0 / 0.08);
333333
--drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / 0.15);
334-
--drop-shadow-none: 0 0 #0000;
335334

336335
/* Spacing */
337336
--spacing-px: 1px;

0 commit comments

Comments
 (0)