diff --git a/CHANGELOG.md b/CHANGELOG.md index 25a113f69c87..89d39ed950b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Ensure there's always a space before `!important` when stringifying CSS ([#14611](https://github.com/tailwindlabs/tailwindcss/pull/14611)) - _Upgrade (experimental)_: Ensure CSS before a layer stays unlayered when running codemods ([#14596](https://github.com/tailwindlabs/tailwindcss/pull/14596)) - _Upgrade (experimental)_: Resolve issues where some prefixed candidates were not properly migrated ([#14600](https://github.com/tailwindlabs/tailwindcss/pull/14600)) +- Don't set `display: none` on elements that use `hidden="until-found"` ([#14631](https://github.com/tailwindlabs/tailwindcss/pull/14631)) ## [4.0.0-alpha.26] - 2024-10-03 diff --git a/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap b/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap index 2edc7281fca5..a3442c5c93c7 100644 --- a/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap +++ b/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap @@ -576,7 +576,7 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = ` height: auto; } - [hidden] { + [hidden]:where(:not([hidden="until-found"])) { display: none !important; } } diff --git a/packages/tailwindcss/preflight.css b/packages/tailwindcss/preflight.css index bf664fc2be89..169f646ba0ab 100644 --- a/packages/tailwindcss/preflight.css +++ b/packages/tailwindcss/preflight.css @@ -321,6 +321,6 @@ video { Make elements with the HTML hidden attribute stay hidden by default. */ -[hidden] { +[hidden]:where(:not([hidden='until-found'])) { display: none !important; }