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

Use no value instead of blur(0px) for backdrop-blur-none and blur-none utilities #13830

Merged
merged 3 commits into from
Jun 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 @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Disable automatic `var()` injection for anchor properties ([#13826](https://github.com/tailwindlabs/tailwindcss/pull/13826))
- Use no value instead of `blur(0px)` for `backdrop-blur-none` and `blur-none` utilities ([#13830](https://github.com/tailwindlabs/tailwindcss/pull/13830))

## [3.4.4] - 2024-06-05

Expand Down
4 changes: 2 additions & 2 deletions src/corePlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -2596,7 +2596,7 @@ export let corePlugins = {
{
blur: (value) => {
return {
'--tw-blur': `blur(${value})`,
'--tw-blur': value.trim() === '' ? ' ' : `blur(${value})`,
'@defaults filter': {},
filter: cssFilterValue,
}
Expand Down Expand Up @@ -2751,7 +2751,7 @@ export let corePlugins = {
{
'backdrop-blur': (value) => {
return {
'--tw-backdrop-blur': `blur(${value})`,
'--tw-backdrop-blur': value.trim() === '' ? ' ' : `blur(${value})`,
'@defaults backdrop-filter': {},
'backdrop-filter': cssBackdropFilterValue,
}
Expand Down
2 changes: 1 addition & 1 deletion stubs/config.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ module.exports = {
},
blur: {
0: '0',
none: '0',
none: '',
sm: '4px',
DEFAULT: '8px',
md: '12px',
Expand Down
11 changes: 11 additions & 0 deletions tests/basic-usage.test.css
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,11 @@
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);
}
.blur-none {
--tw-blur: ;
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);
}
.brightness-150 {
--tw-brightness: brightness(1.5);
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale)
Expand Down Expand Up @@ -1027,6 +1032,12 @@
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-blur-none {
--tw-backdrop-blur: ;
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-50 {
--tw-backdrop-brightness: brightness(0.5);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast)
Expand Down
4 changes: 2 additions & 2 deletions tests/basic-usage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ test('basic usage', () => {
<div
class="
filter filter-none
blur-md
blur-md blur-none
brightness-150
contrast-50
drop-shadow-md
Expand All @@ -144,7 +144,7 @@ test('basic usage', () => {
class="
backdrop-filter
backdrop-filter-none
backdrop-blur-lg
backdrop-blur-lg backdrop-blur-none
backdrop-brightness-50
backdrop-contrast-0
backdrop-grayscale
Expand Down
Loading