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
Prev Previous commit
Next Next commit
Fix issue with default values
  • Loading branch information
thecrypticace committed Nov 20, 2024
commit bf14f951bfe1022ca354a41c02b96d9762ebf041
6 changes: 6 additions & 0 deletions packages/tailwindcss/src/utilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13639,6 +13639,7 @@ test('filter', async () => {
'invert',
'invert-0',
'invert-[var(--value)]',
'drop-shadow',
'drop-shadow-xl',
'drop-shadow-[0_0_red]',
'saturate-0',
Expand Down Expand Up @@ -13692,6 +13693,11 @@ test('filter', async () => {
filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
}

.drop-shadow {
--tw-drop-shadow: drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);
filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
}

.drop-shadow-\\[0_0_red\\] {
--tw-drop-shadow: drop-shadow(0 0 red);
filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
Expand Down
4 changes: 3 additions & 1 deletion packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ export function createUtilities(theme: Theme) {
value =
desc.defaultValue !== undefined
? desc.defaultValue
: theme.resolve(null, desc.themeKeys ?? [])
: desc.inlineThemeValues
? theme.resolveValue(null, desc.themeKeys ?? [])
: theme.resolve(null, desc.themeKeys ?? [])
} else if (candidate.value.kind === 'arbitrary') {
if (candidate.modifier) return
value = candidate.value.value
Expand Down
Loading