Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Ensure shadow-inherit inherits the shadow color
  • Loading branch information
wongjn committed Apr 11, 2025
commit b1fcea889a612f8c03bf1031aaa74626505c5dbb
6 changes: 0 additions & 6 deletions packages/tailwindcss/src/utilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23968,12 +23968,6 @@ test('shadow', async () => {
--tw-shadow-color: inherit;
}

@supports (color: color-mix(in lab, red, red)) {
.shadow-inherit {
--tw-shadow-color: color-mix(in oklab, inherit var(--tw-shadow-alpha), transparent);
}
}

.shadow-red-500 {
--tw-shadow-color: #ef4444;
}
Expand Down
7 changes: 7 additions & 0 deletions packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5275,6 +5275,13 @@ export function createUtilities(theme: Theme) {
decl('--tw-shadow', nullShadow),
decl('box-shadow', cssBoxShadowValue),
]

case 'inherit':
if (candidate.modifier) return
return [
boxShadowProperties(),
decl('--tw-shadow-color', 'inherit'),
]
}

// Shadow size
Expand Down