Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always generate -webkit-backdrop-filter property #13997

Merged
merged 2 commits into from
Jul 13, 2024
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 @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Use no value instead of `blur(0px)` for `backdrop-blur-none` and `blur-none` utilities ([#13830](https://github.com/tailwindlabs/tailwindcss/pull/13830))
- Add `.mts` and `.cts` config file detection ([#13940](https://github.com/tailwindlabs/tailwindcss/pull/13940))
- Don't generate utilities like `px-1` unnecessarily when using utilities like `px-1.5` ([#13959](https://github.com/tailwindlabs/tailwindcss/pull/13959))
- Always generate `-webkit-backdrop-filter` for `backdrop-*` utilities ([#13997](https://github.com/tailwindlabs/tailwindcss/pull/13997))

## [3.4.4] - 2024-06-05

Expand Down
15 changes: 14 additions & 1 deletion src/corePlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -2753,6 +2753,7 @@ export let corePlugins = {
return {
'--tw-backdrop-blur': value.trim() === '' ? ' ' : `blur(${value})`,
'@defaults backdrop-filter': {},
'-webkit-backdrop-filter': cssBackdropFilterValue,
'backdrop-filter': cssBackdropFilterValue,
}
},
Expand All @@ -2768,6 +2769,7 @@ export let corePlugins = {
return {
'--tw-backdrop-brightness': `brightness(${value})`,
'@defaults backdrop-filter': {},
'-webkit-backdrop-filter': cssBackdropFilterValue,
'backdrop-filter': cssBackdropFilterValue,
}
},
Expand All @@ -2783,6 +2785,7 @@ export let corePlugins = {
return {
'--tw-backdrop-contrast': `contrast(${value})`,
'@defaults backdrop-filter': {},
'-webkit-backdrop-filter': cssBackdropFilterValue,
'backdrop-filter': cssBackdropFilterValue,
}
},
Expand All @@ -2798,6 +2801,7 @@ export let corePlugins = {
return {
'--tw-backdrop-grayscale': `grayscale(${value})`,
'@defaults backdrop-filter': {},
'-webkit-backdrop-filter': cssBackdropFilterValue,
'backdrop-filter': cssBackdropFilterValue,
}
},
Expand All @@ -2813,6 +2817,7 @@ export let corePlugins = {
return {
'--tw-backdrop-hue-rotate': `hue-rotate(${value})`,
'@defaults backdrop-filter': {},
'-webkit-backdrop-filter': cssBackdropFilterValue,
'backdrop-filter': cssBackdropFilterValue,
}
},
Expand All @@ -2828,6 +2833,7 @@ export let corePlugins = {
return {
'--tw-backdrop-invert': `invert(${value})`,
'@defaults backdrop-filter': {},
'-webkit-backdrop-filter': cssBackdropFilterValue,
'backdrop-filter': cssBackdropFilterValue,
}
},
Expand All @@ -2843,6 +2849,7 @@ export let corePlugins = {
return {
'--tw-backdrop-opacity': `opacity(${value})`,
'@defaults backdrop-filter': {},
'-webkit-backdrop-filter': cssBackdropFilterValue,
'backdrop-filter': cssBackdropFilterValue,
}
},
Expand All @@ -2858,6 +2865,7 @@ export let corePlugins = {
return {
'--tw-backdrop-saturate': `saturate(${value})`,
'@defaults backdrop-filter': {},
'-webkit-backdrop-filter': cssBackdropFilterValue,
'backdrop-filter': cssBackdropFilterValue,
}
},
Expand All @@ -2873,6 +2881,7 @@ export let corePlugins = {
return {
'--tw-backdrop-sepia': `sepia(${value})`,
'@defaults backdrop-filter': {},
'-webkit-backdrop-filter': cssBackdropFilterValue,
'backdrop-filter': cssBackdropFilterValue,
}
},
Expand All @@ -2896,9 +2905,13 @@ export let corePlugins = {
addUtilities({
'.backdrop-filter': {
'@defaults backdrop-filter': {},
'-webkit-backdrop-filter': cssBackdropFilterValue,
'backdrop-filter': cssBackdropFilterValue,
},
'.backdrop-filter-none': { 'backdrop-filter': 'none' },
'.backdrop-filter-none': {
'-webkit-backdrop-filter': 'none',
'backdrop-filter': 'none',
},
})
},

Expand Down
28 changes: 27 additions & 1 deletion tests/arbitrary-values.test.css
Original file line number Diff line number Diff line change
Expand Up @@ -1055,54 +1055,81 @@
}
.backdrop-blur-\[11px\] {
--tw-backdrop-blur: blur(11px);
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-brightness-\[1\.23\] {
--tw-backdrop-brightness: brightness(1.23);
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-contrast-\[0\.87\] {
--tw-backdrop-contrast: contrast(0.87);
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-grayscale-\[0\.42\] {
--tw-backdrop-grayscale: grayscale(0.42);
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-hue-rotate-\[1\.57rad\] {
--tw-backdrop-hue-rotate: hue-rotate(1.57rad);
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-invert-\[0\.66\] {
--tw-backdrop-invert: invert(0.66);
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-opacity-\[22\%\] {
--tw-backdrop-opacity: opacity(22%);
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-saturate-\[144\%\] {
--tw-backdrop-saturate: saturate(144%);
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-sepia-\[0\.38\] {
--tw-backdrop-sepia: sepia(0.38);
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert)
var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
Expand Down Expand Up @@ -1144,4 +1171,3 @@
grid-template-columns: 200px repeat(auto-fill, minmax(15%, 100px)) 300px;
}
}

Loading