Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Show suggestions for fractions in IntelliSense ([#16353](https://github.com/tailwindlabs/tailwindcss/pull/16353))
- Don’t replace `_` in suggested theme keys ([#16433](https://github.com/tailwindlabs/tailwindcss/pull/16433))
- Ensure `--default-outline-width` can be used to change the `outline-width` value of the `outline` utility
- Ensure drop shadow utilities don't inherit unexpectedly ([#16471](https://github.com/tailwindlabs/tailwindcss/pull/16471))

## [4.0.6] - 2025-02-10

Expand Down
5 changes: 5 additions & 0 deletions packages/tailwindcss/src/utilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13407,6 +13407,11 @@ test('filter', async () => {
@property --tw-sepia {
syntax: "*";
inherits: false
}

@property --tw-drop-shadow {
syntax: "*";
inherits: false
}"
`)
expect(
Expand Down
1 change: 1 addition & 0 deletions packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3152,6 +3152,7 @@ export function createUtilities(theme: Theme) {
property('--tw-opacity'),
property('--tw-saturate'),
property('--tw-sepia'),
property('--tw-drop-shadow'),
])
}

Expand Down
29 changes: 29 additions & 0 deletions packages/tailwindcss/tests/ui.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,35 @@ test('inset shadow colors', async ({ page }) => {
)
})

test('filter', async ({ page }) => {
let { getPropertyValue } = await render(
page,
html`
<div
id="a"
class="blur-md brightness-50 contrast-50 drop-shadow-md grayscale hue-rotate-180 invert saturate-50 sepia"
>
<div id="b" class="contrast-100"></div>
</div>
`,
)

expect(await getPropertyValue('#a', 'filter')).toEqual(
[
'blur(12px)',
'brightness(0.5)',
'contrast(0.5)',
'grayscale(1)',
'hue-rotate(180deg)',
'invert(1)',
'saturate(0.5)',
'sepia(1)',
'drop-shadow(rgba(0, 0, 0, 0.12) 0px 3px 3px)',
].join(' '),
)
expect(await getPropertyValue('#b', 'filter')).toEqual('contrast(1)')
})

test('outline style is optional', async ({ page }) => {
let { getPropertyValue } = await render(
page,
Expand Down